Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have a table that I've added conditional formating as below.
However, it is not working on all rows, even though they have the same text string (it cannot be a space character on the end, because the column is calculated)
Solved! Go to Solution.
I think it was related to having the "Show items without data" marked. When I disabled it worked.
Hello,
Kindly provide the sample input/output in a usuable format (excel, csv, table etc.) masking sensitive information.
reference : https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
A potential solution is using field parameters. This ill give you more control on the output ( custom functions/expressions to test the conditional formatting) . For reference:
Write Conditional Statement Using SWITCH in DAX and Power BI - RADACAD
Thanks,
Hi, adudani
The data comes from an API, via dataflow
Here's a a sample, extracted directly from PowerBI (Iidk how to take it except like this)
Here's also another example of how it is looking:
I is occurring on several columns, but here's one example of the DAX of one them:
_Calculated_InvestigationLevelCheck =
IF(RIGHT([CaseType L1],8) = "Incident",
IF(
OR(
OR(
AND(
[InvestigationLevel]="Level 3",
[RiskArea Int]<3
),
AND(
[InvestigationLevel]="Level 2",
[RiskArea Int]<2
)
),
AND(
[InvestigationLevel]="Level 3",
[AuthorityNotifiedName]="ANP (Brazilian Petroleum Agency)"
)
),
"Investigation Level Incorrect",
"Investigation Level correct"
),
BLANK()
)
I did try to use the SWITCH function as you suggested, but it is still behaving weird:
_Calculated_AuthorityNotifiedCheck =
SWITCH(RIGHT([CaseType L1],8),"Incident",
SWITCH(
TRUE(),
AND(
[AuthorityNotified] = "Authority not Notified",
ISTEXT([AuthorityNotifiedName])
),
"Error on Authority Notified",
"Authority Notified correct"
),
BLANK()
)
If there's any other info I can send, let me know.
Thanks.
Is this the expected output? ( the CF measure can be applied to all other column cell elements if required)
I think it was related to having the "Show items without data" marked. When I disabled it worked.
Actually no. I need differenc CF for each column.
The problem for me is that it is only working for a few rows.
But should I try using Measures to base the CF instead of the columns itself?
The switch logic provided in the pbix file will enable you to create different CF measures for different columns. The screenshot above is to demonstrate that the function will work for all rows in the selected column.
Got it, but unfortunatelly it is still only working for a few rows.
User | Count |
---|---|
63 | |
59 | |
56 | |
38 | |
29 |
User | Count |
---|---|
82 | |
62 | |
45 | |
41 | |
40 |