Forum Discussion
Anonymous
3 years agoNot applicable
Creating calculated column with blanks and number comparison
I have a column of "Target" values with some blank rows and a measure calculation "Measure1" based off other columns. I want to create a new column "Value Color" that compares the Measure1 to the Tar...
- 3 years ago
better to do a switch statement ie.
ValueColor =
SWITCH (
TRUE (),
ISBLANK ( 'Table'[Target] ), BLANK (),
[Measure1] > SUM ( 'Table'[Target] ), "#31991a",
[Measure1] <= SUM ( 'Table'[Target] ), "#ff4a4a",
BLANK ()
)
vanessafvg
Community Champion
3 years agobetter to do a switch statement ie.
ValueColor =
SWITCH (
TRUE (),
ISBLANK ( 'Table'[Target] ), BLANK (),
[Measure1] > SUM ( 'Table'[Target] ), "#31991a",
[Measure1] <= SUM ( 'Table'[Target] ), "#ff4a4a",
BLANK ()
)