Forum Discussion
Measure Conditional formatting
- 1 year ago
Hi AllanBerces
You formula is invalid because of how logical conditions are written. Each condition must be fully specified but you took a shortcut isntead. [Mech_Ratio] && [Scaff_Ratio] && [El_Ratio] - will return either true or false and you compare that with the second part of the condition which will return either true or false as well. True/False > True/False just doesnt make sense in this context. Try:
Mismatch Color_rev = SWITCH ( TRUE (), [Mech_Ratio] > [Mech Target] && [Scaff_Ratio] > [Scaff Target] && [El_Ratio] > [EI Target], "RED", [Mech_Ratio] < [Mech Target] && [Scaff_Ratio] < [Scaff Target] && [El_Ratio] < [EI Target], "GREEN", "ORANGE" ) - 1 year ago
Hi AllanBerces ,
Thank you for bringing this up, and I appreciate danextian , ryan_mayu valuable input on the logic structure. I’ve tested the full scenario and can confirm that the measure works as intended.
FYI:I used Field value formatting in Power BI, and the colors display correctly. If you notice gradients or blue tones, please check that the format style is set to Field value, not Gradient.
I’ve attached a .pbix file with sample data for your reference. Let me know if you want to adjust the logic or make it dynamic.
Regards,
Yugandhar.
Hi AllanBerces ,
Thank you for bringing this up, and I appreciate danextian , ryan_mayu valuable input on the logic structure. I’ve tested the full scenario and can confirm that the measure works as intended.
FYI:
I used Field value formatting in Power BI, and the colors display correctly. If you notice gradients or blue tones, please check that the format style is set to Field value, not Gradient.
I’ve attached a .pbix file with sample data for your reference. Let me know if you want to adjust the logic or make it dynamic.
Regards,
Yugandhar.