Forum Discussion
Anonymous
7 years agoNot applicable
Conditional Formatting - Background with Rules
I have a situation where the users want Gross Sales to be blacked out for certain products since there is no data. I created custom columns to identify this situation. Gross Sales Flag = if('ta...
jsh121988
7 years agoMicrosoft Employee
You could possibly do format by field, and have a measure output the color values like this:
_dm_Per_MeasureFormatColors =
SWITCH(TRUE(),
[_dm_Per_Measure] >= 0 && [_dm_Per_Measure] < .8, "#fd625e", // Red
[_dm_Per_Measure] >= .8 && [_dm_Per_Measure] < .97, "#f2c80f", // Yellow
[_dm_Per_Measure] >= .97, "#34c6bb", // Green
"#eaeaea"
)You can basically implement any logic you want into it, and it centralizes the formatting so you only have to make changes in a single location.