Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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 |
---|---|
21 | |
20 | |
13 | |
10 | |
8 |
User | Count |
---|---|
30 | |
28 | |
13 | |
12 | |
11 |