Forum Discussion
Conditional Formatting breaks with "forced" zero
- 2 months ago
dedelman_clng I think the issue might be this condition: can you test by adding color for catch all and see if blank / 0 shows in that color
Summary Color = var __Train = SELECTEDVALUE(DimTrain[Train]) return SWITCH(__Train, "Train 1", "#BFDEF0", "Train 2", "#F8CA93", "Train 3", "#C4C4C6", "Red" )In the attached file, I tried to reproduce your issue, but the conditional formatting for blank (shown as zero) is working fine.
- 2 months ago
dedelman_clng I don't think it is a bug; it seems like a modelling-related issue. It will be very hard to pinpoint without knowing all the modelling details.
dedelman_clng what is your conditional formatting requirement?
If Train 1 = Blue. Train 2 = Orange and Train 3 = Grey, is this correct understanding?
How you are fomatting right now?
Yes - apologies. The formatting is exactly that - Train 1 = Blue, Train 2 = Orange, Train 3 = Gray
Under "Specific Column" I have left the default settings, and under Cell Elements -> Background I have tried both Rule based formatting (Train = "Train 1" then Blue, etc) and Field Value based formatting
Summary Color = var __Train = SELECTEDVALUE(DimTrain[Train])
return
SWITCH(__Train,
"Train 1", "#BFDEF0",
"Train 2", "#F8CA93",
"Train 3", "#C4C4C6")Both leave the 0s with no formatting, but work correctly if the value is non-zero.
Thanks,
David