Power BI - Bar chart with one bar per logical column in table - powerbi

I have a table of things, and multiple true/false columns of attributes for that thing.
I want to make a bar chart with one bar for each attribute, and the value being a count of Thing IDs where the attribute is TRUE:
I'm sure it's simple but I'm having trouble, and I'd appreciate any help.

In the Power Query editor, you can pivot the columns of the attributes.
Select the attribute columns and click on tab transform on Pivot column.
you will get:
ThingID | Attribute | Value
then you can add a conditional column to count the TRUE.
If value equals TRUE then 1 else 0
Then make a chart in PowerBI and your Axis is the Attribute column and the Values is your count column and your there.

Related

Tooltip values not updated after selecting value from Slicer

I Have 3 tables,
1st table Measures : Contains all measures calculated using other tables and measures column names are ProgressPercentage, ProgressA and ProgressB.
2nd table Modules : This table contain distinct modules uses one of the slicer.
3rd table Iterations : This tables contains column Iteration in dates format which uses X-Axis in line graph and another column name is Area which uses for other slicer.
Using ProgressA and ProgressB I calculated ProgressPercentage.
In line graph x-axis is Iteration (Dates), Line represented in % uses measure column ProgressPercentage. In tooltip their are two values ProgressA and ProgressB.
Now issue is when I select Area from slicer then line graph is updated but not tooltip values. How I can update tooltip values using different table?

How to copy highest value name as new column value in power bi?

I'm trying to create a new column which is filled by the highest value name and condition is today date and if suppose two values are the same then we have to pick the first one value name.
My table is
My Expected table is
Condition is
select screen name has new column value from the most viewed screen by using a count value, selected customer count should be 1 group by id and start date
Best approach here would be that you add a blank query in the query editor. Make the blank query the same table as your first table.
=FirstTableName
Call the blank query SecondTable for example.
Add a filter with the current date.
Group your table by Screen, by count and by the start date. (I think you need a count value that the grouping will work)
Add a sort order for the column count (descanding).
Delete all rows expect the first row.
The result is now one row with the highest value in the count column on todays date.
Join this one row now with your first table. The column screen and the start date are the join columns and expand the screen column from your joined table.
This gives you the result like your second picture.

Conditional Format top 2 rows of a table visual power BI

I have a table visual with a date column and I have a requirement to highlight the top 2 rows. The data on the table visual is sorted desc by the date column.
I need help to conditional format the background color for the top 2 rows.
I tried searching for a way to do this but no luck.
You can calculate the rank of the rows and use conditional formatting to highlight the top 2 rows. But first, we need to define what "top 2 rows" means. You said it is sorted by date descending, so I will assume that "top 2 rows" means the rows with the 2 biggest dates. I will use a measure, which will respond to filters applied on the data. Then we will highlight the rows with rank 1 and 2 (assuming dates are unique in table's rows).
Make new measure like this:
Measure = RANKX(ALLSELECTED('Table'); CALCULATE(SELECTEDVALUE('Table'[Date])))
Where Table is your table name, and Date is the name of the date column. This will give you a number (1, 2, 3...) where 1 is the row with the biggest date, 2 is the second biggest date, and so on.
Then for every field shown in your table, add the following background color condition (right click each item in the list of fields and select Conditional formatting -> Background color):
Set Format by to be Rules, select your measure in Based on field and ad condition > 0 and <= 2 to set the desired background color. Repeat this for all fields shown.

I have find out the mismatch between the two tables in power BI

I have 2 tables :
1st table has 2 columns : A Ticket Id B Combo
Ticket Id has the ticket numbers and Combo column has the Incident Status values and these values can be same for many tickets ids.
2nd Tables has 2 columns : A Compare Combo B Match
Compare combo has the Incident Status values and Match column has Yes or No.
Now we need to check each Combo value of first table with the Compare column of second table and if the Match column has the value Yes then it should be there in the BI report.
The things I have tried
LookupValue: Giving error that only single value is allowed.
If: Not allowed because there is no relationship between two tables.
It sounds like you simply need to create a relationship between the two tables on field Combo, then filter your report / visualisation based on field Table2[Match] = Yes

data points and straight lines in Line Chart

I am infant to power bi , And Below is the data which resembles to my
data set in Power BI
And below is result for the above data table
But my client wan'ts the dot lines in it and he is expecting the
report result to be as below
Can any one please help me how can I make it
First unpivot the Quarter columns:
-Click 'Edit Queries' at the top
-Select "Transform' tab
-Select the 4 quarter columns (Select 1st column, shift click last column to selct them
-Select 'Unpivot Columns'
-Back to home tab, close and apply
Now add a line chart visual. Place the new column (Which depicts the quarter) in the 'Axis' field. Place the values for the companies in the Values field.