Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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 report with a table with load of columns and information.
Some of the columns are yes/no columns (only they say J / N because I'm in the Netherlands)
For some of the columns I want to hightlight the J of the N. In this example I want to make the N have an orange background.
I created this measure to use in condition formatting:
Formatting LBD = IF ( SELECTEDVALUE ( 'Table1'[LBD] ) = "N", "#E37222" )
Then I format the background of the column in the table like you can see in the screenshot.
But then it is sometimes working, and sometimes not, I am going nuts!!
I created test measures, to see what comes out of the : selected value ( 'Table1'[LBD] )
I also changed he measure to max ( 'Table1'[LBD] ) , when putting this in the test measure and in a KPI box, it shows up as "N", another testmeasure then gives me as a result: "#E37222"
But in the table it will not light up in orange.
I also checked if the data (Selected person) has multiple values, it does have extra rows, but all of them give "N" for the LBD column. Also other persons, do light up orange, with also multiple lines in the table.
Only way to make it work, is to put the measure (Formatting LBD = IF ( SELECTEDVALUE ( 'Table1'[LBD] ) = "N", "#E37222" ))
also in the table, for some reason it then works properly.
But my table has about 5 columns I would like to check and I don't want to add 5 columns, just for formattingpurposes, it will not give the end user any extra information...
Also, deleting other columns in the table, has an effect apparently, because it looks like the formatting is randomly changing. Who knows what is going on? I really don't understand why it would matter what other columns do when every row for the same person gives "N" and thats what the measure is checking on...
I cannot share data, as it is all very sensitive ( I work in healthcare and every column is about a patient or doctor )
Hope someone can help me, I encounter it a lot.
KR
Hi @Niki ,
While using selectedvalue() function, please make sure it will return single value. If it returned multiple values, the result would be blank.
Best Regards,
Jay
Hi,
Thanks,
I started out with using Max (instead of selected value), but this isn't working either.
It randomly lights up cells, but not all...
This is not a really hard question right, I cannot imagine I am the only one who wants to light up cells with textvalues in a table in PowerBI...
What is the solution to doing this? Adding the measure to the table, solves the problem, but its already an huge table with a lot of info, I don't want to add 5 more columns just for conditional formatting, shouldn't have to right?
KR
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
69 | |
55 | |
37 | |
35 |
User | Count |
---|---|
85 | |
66 | |
59 | |
46 | |
45 |