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 met two problems when I use background color.
First, when I use "Format by Field value", it errors and says don't recognize.
Second, I want to set the color for rows of matrix for which Sales2 is not blank. But the only way I can do this is set for each measure right? For example, when I set Sales background color, I cannot find "is not blank".
I also think it's tricky to set for each measure. I want the whole row to be colored only if Sales2 is not blank.
Here is the pbix file:
https://www.dropbox.com/s/5s5drfgix1xhsut/conditional%20color.pbix?dl=0
Thanks a lot!
Solved! Go to Solution.
Hi @YunJ ,
Create a measure and set it in Conditional formatting.
Measure = IF(MAX('Number'[Sales2])<>BLANK(),"light blue")
You can check more details from here.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @YunJ ,
Could you tell me if your problem has been solved?
If it is, kindly Accept it as the solution. More people will benefit from it.
Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.
Best Regards,
Stephen Tao
@YunJ , to use the field value option. You need to return color. Create a measure that return color name or hexcode
example
Colour =
SWITCH(TRUE(),
'Table'[Date] < TODAY(), "red",
'Table'[Date] = TODAY(), "orange",
"green")
Colour =
SWITCH(TRUE(),
max('Table'[Month Year]) = "Jan-2020", "red",
Max('Table'[Month Year]) < "Feb-2020", "orange",
//keep on adding
"green")
Measure =
Switch(true(),
max(Table[Column]) = "R1" , "Red" ,
max(Table[Column]) = "R2" , "Green" ,
max(Table[Column]) = "R3" , "Pink "
)
Check
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
Hi @amitchandak Thanks for sharing. Do you have any thought on the second question? I want to set color for rows where Sales2 is not blank.
Thanks a lot for your time!
Hi @YunJ ,
Create a measure and set it in Conditional formatting.
Measure = IF(MAX('Number'[Sales2])<>BLANK(),"light blue")
You can check more details from here.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |