Forum Discussion
Conditional Formatting Issues - Fields are dropdowns
Hi Sonia316 ,
For this you need to create a calculation based on the values of the profiles and on the maximum and minimums, for each of the metrics.
Can you please confirm that the names on the colours are the ones corresponding to the columns names on the page Quality Check?
- Sonia3164 years agoHelper I
Thanks MFelix - I could use all the help possible.
The JSON I am using in SharePoint looks like this - red, yellow, no color.
The values are kept in another table called Profile Master. Using WidthTop and Width Bottom would have the same code.
Their colums are as you see below - there are 4, WidthA being Red, Width B&C are yellow, and WidthD is plain.
"background-color": "=if(@currentField == '', 'rgba(0, 0, 0, 0.3)', if(@currentField < [$Profile_x003a_IRVWidthA], 'rgba(240, 52, 52, 1)', if(@currentField <= [$Profile_x003a_IRVWidthB], 'rgba(255, 255, 126, 1)', if(@currentField < [$Profile_x003a_IRVWidthC], 'rgba(255, 255, 255, 1)', if(@currentField <= [$Profile_x003a_IRVWidthD], 'rgba(255, 255, 126, 1)', 'rgba(240, 52, 52, 1)')))))"
},I am new to PowerBi and I've been struggling for over a week. I was hoping to get this report done for this Sprint.
- Sonia3164 years agoHelper I
I created this measure for one -
Color Transcend2Trop1x5.5GR =SWITCH (TRUE(),SELECTEDVALUE('Profile Master'[Title] = Transcend 2.0 Trop 1x5.5 GR),'Quality Check'[WidthTop] <5.535, "red",'Quality Check'[WidthTop] <=5.54, "yellow",'Quality Check'[WidthTop] <=5.6, "yellow",'Quality Check'[WidthTop] <5.595, "white")But it's not recognizing the field WidthTop.These are my ranges Red Yellow WhiteTranscend 2.0 Trop 1 X 5.5 GR > 5.600 5.595 to 5.600 5.594 to 5.541 < 5.535 5.535 to 5.540