Forum Discussion
conditional formatting
- 5 years ago
Hi, WJ876400
According to your description and sample picture, you want to set the conditional format for the [% of Total] for the color Red, right?
You can try my steps:
This is the test data I created according to your sample picture:
- Create these measures:
Number of students = COUNTX(FILTER(ALLSELECTED('Table'),[ID]=MAX('Table'[ID])),[ID])% of Total = var _total=COUNTX(ALL('Table'),[ID]) return DIVIDE([Number of students],_total )Color format = SWITCH( TRUE(), [% of Total]>0.1,"Red", [% of Total]<=0.1&&[% of Total]>=0.03,"Orange", [% of Total]<0.03,"Green" )- I created a Matrix and place these columns and measures, then open the conditional format like this:
And you can get what you want, like this:
You can download my test pbix file here
If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.
How to Get Your Question Answered Quickly
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, WJ876400
According to your description and sample picture, you want to set the conditional format for the [% of Total] for the color Red, right?
You can try my steps:
This is the test data I created according to your sample picture:
- Create these measures:
Number of students =
COUNTX(FILTER(ALLSELECTED('Table'),[ID]=MAX('Table'[ID])),[ID])% of Total =
var _total=COUNTX(ALL('Table'),[ID])
return
DIVIDE([Number of students],_total )Color format =
SWITCH(
TRUE(),
[% of Total]>0.1,"Red",
[% of Total]<=0.1&&[% of Total]>=0.03,"Orange",
[% of Total]<0.03,"Green"
)
- I created a Matrix and place these columns and measures, then open the conditional format like this:
And you can get what you want, like this:
You can download my test pbix file here
If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.
How to Get Your Question Answered Quickly
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.