Forum Discussion
Conditional Formatting based on calculated measure
- 7 years ago
Hi Anonymous ,
Based on my test, you could refer to below steps:
Create three parameters:
Create a measure:
Measure = var V=CALCULATE(SUM('Table'[Value])) return IF(V>R[R Value],"#FD625E", IF(V>[A Value]&&V<R[R Value],"#F2C80F", IF(V>G[G Value]&&V<R[R Value],"#01B8AA")))Using the conditional formatting withe the above measure for your matrix:
Now you could change the parameters for your colored visual.
You could also download the pbix file to have a view.
Regards,
Daniel He
Hi Anonymous ,
Based on my test, you could refer to below steps:
Create three parameters:
Create a measure:
Measure = var V=CALCULATE(SUM('Table'[Value]))
return IF(V>R[R Value],"#FD625E",
IF(V>[A Value]&&V<R[R Value],"#F2C80F",
IF(V>G[G Value]&&V<R[R Value],"#01B8AA")))
Using the conditional formatting withe the above measure for your matrix:
Now you could change the parameters for your colored visual.
You could also download the pbix file to have a view.
Regards,
Daniel He
- Anonymous7 years agoNot applicable
Genius v-danhe-msft , thank you very much for this solution.
Any ideas how I can default all other blank values as grey or something similar? seems like the else in the if statement doesnt allow for this?
See below of my version:
ColourLogic = VAR V= [AboveSD%s]*100 return SWITCH(TRUE(), V>=[%Red_Param Value],"#FF3333", V>='%Amber_Param'[%Amber_Param Value],"#FFCE33", V>='%Green_Param'[%Green_Param Value], "#71FF33", ISBLANK(V),"#CCCCCC")Its the else bit that doesnt appear to work. Ive tried without the ISBLANK also.
- v-danhe-msft7 years agoMicrosoft Employee
Hi Anonymous ,
Could you have refered my measure:
Measure = var V=CALCULATE(SUM('Table'[Value])) return IF(V>R[R Value],"#FD625E", IF(V>[A Value]&&V<R[R Value],"#F2C80F", IF(V>G[G Value]&&V<R[R Value],"#01B8AA")))You need to give your IF condition with a range, if all IF condition is >, the dax could only show one of the IF conditions.
Regards,
Daniel He