Forum Discussion
Measures for conditional formatting are not available to select
- Anonymous4 years ago
HI Anonymous,
Here is the measure formula for color formatting, you can create a new measure with these codes and set 'background color' conditional formatting with 'field value' mode on the '% Sales vs Target' field:
color format = IF ( [% Sales vs Target] < 0.9, "Red", IF ( [% Sales vs Target] <= 1, "Blue", "Green" ) )Notice: If these default color names are not suitable for your requirement, you can also use a 6-bit hex color code to replace the color names in the above formula.
Regards,
Xiaoxin Sheng
Hi Anonymous,
Can you please share a pbix or some dummy data that keep raw data structure with expected results? It should help us clarify your scenario and test to coding formula.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
Hi Anonymous
I attach the pbix with some dummy data and the measure I'm trying to use. I also add here a screenshot to see if this helps too. Since I cannot attach it here directly I've uploaded it into my drive. Here is the link to download it:
https://drive.google.com/file/d/1NX-L8syJodQRh2fdrhAqqUIjdQ35qR8K/view?usp=sharing
You see here colourised the value over 100% in green. What I want is the values from 0 to 90% in red, between 90 and 100% in blue (or even better not colourise these ones) and over 100% in green.
I only manage to colourise the green one and I know I didn't set it up very well either... (you can see it in the pbix)
Thank you so much for your help! 🙂
- Anonymous4 years agoNot applicable
HI Anonymous,
Here is the measure formula for color formatting, you can create a new measure with these codes and set 'background color' conditional formatting with 'field value' mode on the '% Sales vs Target' field:
color format = IF ( [% Sales vs Target] < 0.9, "Red", IF ( [% Sales vs Target] <= 1, "Blue", "Green" ) )Notice: If these default color names are not suitable for your requirement, you can also use a 6-bit hex color code to replace the color names in the above formula.
Regards,
Xiaoxin Sheng
- Anonymous4 years agoNot applicable
Hi Anonymous
That's BRILLIANT! That's exactly what I needed, thank you so much!
I guess I wasn't able to choose my measure because it has an error somewhere in the code... I'm still learning and I should try to keep it simple as much as possible...
I already tried different colours using your code and even hex code and all works.
Thank you very much!! 😊😊😊