Forum Discussion
jignaski18
6 years agoHelper II
Data Manipulation for Matrix Table
I need some help with formatting my data in order to organize my matrix table correctly. I have searched the web for 2-3 days now trying multiple methods but with no luck on a solution. I have tried ...
- 6 years ago
Hi jignaski18 ,
You also need to add the selection of the measure as in the previous formula should be:
Conditional Formatting= SWITCH(TRUE(); SELECTEDVALUE(Table[MeasureName]) = 1 && [Measure1] >0 ; "#FFFFFF"; SELECTEDVALUE(Table[MeasureName]) = 1 && [Measure1] <0 ; "#000000"; ...;...; SELECTEDVALUE(Table[MeasureName]) = 99 && [Measure99] > 0 ; "#123456"; SELECTEDVALUE(Table[MeasureName]) = 99 && [Measure99] < 0 ; "#999999" )Should work as expected, sorry for misleading you.
jignaski18
6 years agoHelper II
Thank you MFelix . Sorry for not including the data. I have already managed to do that. The problem is since there is only "one" value, you cannot conditionally format each measure. I cannot share the actual data for confidentiality purposes. My DAX is written just as you had suggested.
MFelix
6 years agoSuper User
Hi jignaski18 ,
You need to follow the same logic but make a switch stamente with more arguments for example:
Conditional Formatting=
SWITCH(TRUE();
[Measure1] >0 ; "#FFFFFF";
[Measure1] <0 ; "#000000";
...;...;
[Measure99] > 0 ; "#123456";
[Measure99] < 0 ; "#999999"
)
the use this as color if you want to use trafic ligth similars you just need to replace the "#FFFF" by numbers example (1, 2, 3) and then set each one for the sign you need.