Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I want to create a measure to highlight below or above the average price.
For example
Customer Price Check
A 5 below average ==> red
B 7 above average ==> green
C 6
Hey @mjmjn2611 ,
you can add the color as a calculated column:
Check =
VAR vRowPrice = myTable[Price]
VAR vAveragePrice = AVERAGE(myTable[Price])
RETURN
SWITCH(
TRUE(),
vRowPrice < vAveragePrice, "red",
vRowPrice > vAveragePrice, "green"
)
Then you can use that column for the conditional formatting:
And that's then the result you get:
User | Count |
---|---|
57 | |
22 | |
21 | |
19 | |
16 |
User | Count |
---|---|
87 | |
87 | |
52 | |
37 | |
23 |