Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi
I have a table with three true/false columns, let’s call them isTested, isDeployed and isAccepted. From these columns I need to create a bar chart that shows each of these columns in two colors representing the true/false ratio. This proves to be a much more challenging than I expected, and any help would be greatly appreciated!
Thank you
Stefaan
Hi @Stefaan-4365 ,
How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?
Best regards,
Hi @Stefaan-4365 ,
We can try to create a calculated table and a measure to meet your requirement:
calculated table:
Table 2 =
CROSSJOIN (
DATATABLE (
"Category", STRING,
{
{ "isTested" },
{ "isDeployed" },
{ "isAccepted" }
}
),
{ TRUE (), FALSE () }
)
measure:
Rate =
DIVIDE (
SWITCH (
SELECTEDVALUE ( 'Table 2'[Category], BLANK () ),
"isTested", CALCULATE (
COUNTROWS ( 'Table' ),
'Table'[isTested] IN DISTINCT ( 'Table 2'[Value] )
),
"isDeployed", CALCULATE (
COUNTROWS ( 'Table' ),
'Table'[isDeployed] IN DISTINCT ( 'Table 2'[Value] )
),
"isAccepted", CALCULATE (
COUNTROWS ( 'Table' ),
'Table'[isAccepted] IN DISTINCT ( 'Table 2'[Value] )
),
COUNTROWS ( 'Table' )
),
COUNTROWS ( 'Table' ),
0
)
If it doesn't meet your requirement, Could you please show the exact expected result based on the tables that we have shared?
By the way, PBIX file as attached.
Best regards,
@Stefaan-4365 , Create a common dimension with the values true and false. Join them with all three columns. One will active and two will be inactive. Use userelation to make others active
How to use userelation : https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
Create a color column like this
Color Date = if(FIRSTNONBLANK(Table[Value],"true") ="true","green","red")
In coditnal fomatting use it after choosing the "Field"
refer
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |