Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello,
I would like to create a conditional formatting of my following datas:
The result has to be red color if the % in the row is < of the related colum total. (Ex. for actuators less then 32.57% valve less then 32.15) the values are %tr of sales amount
any idea?
thanks.
Sonia
Hi @Soniar ,
You can first use measure to find the Total value, and then use Value to compare.
In my data, Total represents the average of each group.
Here are the steps you can follow:
1. Create measure.
color =
IF(
MAX('Table'[Amount])<
DIVIDE(
SUMX(FILTER(ALL('Table'),'Table'[Group]=MAX('Table'[Group])),[Amount]),
CountX(FILTER(ALL('Table'),'Table'[Group]=MAX('Table'[Group])),[Amount]))
&&HASONEVALUE('Table'[Region])=TRUE()
,"red")
2. [Measure] – Conditional formatting – Background color.
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hello Liu,
Thanks for your reply
I followed your instruction but the result is not correct
I created the Measure color as you suggest
User | Count |
---|---|
128 | |
109 | |
100 | |
65 | |
62 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |