Forum Discussion
CreateU
4 years agoNew Member
Matrix gradient independant to column counts
Hiya, I've got a matrix table with two columns with counts of number of users in a department between two groups. I'm trying to format the background gradient to be independant to the group inste...
v-kkf-msft
4 years agoCommunity Support
Hi CreateU ,
As amitchandak said, you cannot implement a legend-based gradient color for one measure/column.
If you only care about the max and min colors, try using the following measure to format the background color.
color =
VAR maxValue =
MAXX ( ALLSELECTED ( 'Table'[ID] ), [Measure] )
VAR minValue =
MINX ( ALLSELECTED ( 'Table'[ID] ), [Measure] )
RETURN
SWITCH ( [Measure], maxValue, "#118DFF", minValue, "#a0d1ff", "#70bbff" )
Otherwise, you will have to use two measures to achieve it.
Measure_X = CALCULATE ( [Measure], 'Table'[Type] = "X" )Measure_Y = CALCULATE ( [Measure], 'Table'[Type] = "Y" )
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.