Forum Discussion
vjnvinod
4 years agoImpactful Individual
Conditional formatting question
Dear experts, this is the visual I have created in power BI and P7W4 is a measure P7W4 = CALCULATE( DIVIDE(SUM('WTD FY22'[CH]),SUM('WTD FY22'[EAH]),"n/a"),'WTD FY22'[Period Week]="P7WK...
- Anonymous4 years ago
Hi vjnvinod
Create a measure to return the color value .
Measure = Switch( True() , [P7W4] =BLANK(),"Grey", [P7W4] <= SELECTEDVALUE('Table'[Lower Limit]) , "red" , [P7W4] > SELECTEDVALUE('Table'[Lower Limit]) , "Green" )Then set conditional formatting for [P7W4] in table visual . Choose Field value for Format style , Measure for What field should we base this on .
The final result is as shown :
I have attached my pbix file , you can refer to it .
Best Regard
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
mh2587
4 years agoSuper User
color measure =
Switch( True() ,
[P7W4] < [Lower] , "red" ,
[P7W4] > [Upper] , "Green" ,
"Grey"
)