Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi all,
I'm trying to create a new measure that will return 1 or 0 based on the value of a column, so that I can then use that measure to do some conditional formatting on tables fields. Here's what I have for the new measure currently:
Idea is, the column should show a red background if the db student_record'[letter_grade] field is anything but the values listed in the SWITCH statement. What seems to be happening though is only a value of "P" is showing the white background - all others listed in the SWITCH statement - and any other value - is showing in red.
Hi again @tamerj1 - revisiting this as it's still not working. Wanted to provide some context with some screenshots to hopefully help.
So the thing is, that custom column and the conditional formatting is working for the table on the right. Because above, Cole's Working at Heights record with an "EX" isn't showing up as red. But the custom column and conditional formatting isn't working for the table on the left.
Any help, again, much appreciated.
Hi @lcharlebois ,
I have checked the formula, it works well.
Please refer to my pbix file.
If it is possible, please provide your pbix file without privacy information for us to study.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @lcharlebois
you need to check your source data for visible and invisible spaces and characters. You need to use power quert to trim and clean the data. This could be the issue or one of many.
Hi @tamerj1 - thanks for the quick reply.
I definitely considered that, and updated the values on some test records manually rather than through our Java app, with the same result.
I think SELECTEDVALUE returns blank for most of the rows as a result of finding many values. Please Try measure:
SELECTEDVALUE('db student_record'[letter_grade])
and see what results you receive.
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 |
---|---|
16 | |
13 | |
12 | |
11 | |
11 |
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
9 |