Forum Discussion
Data Manipulation for Matrix Table
- 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.
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.
Any reccomendation how to format each value field? I.e Measure 1 is a # and Measure 10 is a %.
Would i just include it in the "value" meaure? Like:
Sumx(table,
switch(table[id],
1,format(Measure1,"0"),
.....
10,format(Measure10,"0.0%")
))
- MFelix6 years agoSuper User
Hi jignaski18 ,
You need to use the FORMAT function something similar to:
elected Measure= SWITCH( SELECTEDVALUE(MeasuresIdentication[ID]); 1; FORMAT([Measure1];"0,0%"); 2; FORMAT([Measure2];"###.###); ...;...; 99; FORMAT([Measure99];"###.### $") )Be aware that the formatting need to be done outside the SUMX function otherwise it will try to sum text values and it will not work.
- jignaski186 years agoHelper II
That is what i did try, sorry for not clarifying that. Unfortunatly when I work outside of the SUMX, then my matrix returns empty rows for all regions(districts), groups(crwname), customers.
- MFelix6 years agoSuper User