Forum Discussion
Anonymous
4 years agoNot applicable
Conditional formatting based on other row ?
Hi all, I am trying to implement conditional formatting based on another row within the filter context but I can't get my head around how to do it. I have a table that looks like this (but then ...
- Anonymous4 years ago
parry2k many thanks for your response. Your measure still wasn't completely correct because it made the first row in my example above green and the rest red. But thanks to your measure I think I was able to figure out what to do, below is my result. Does that seem right to you?
Color Measure = VAR __originalColor = CALCULATE ( MAX ('Table'[Original color] ), ALLEXCEPT ('Table','Table'[Id] ),'Table'[Original color] <> BLANK () ) VAR _originalId = CALCULATE ( MAX ('Table'[Id] ), ALLEXCEPT ('Table','Table'[Id] ),'Table'[Original color] <> BLANK () ) RETURN IF ( __originalColor <> BLANK () && _originalId = MAX('Table'[Id]) && MAX ('Table'[Original color] ) == BLANK (), "Green", "Red" )
Anonymous
4 years agoNot applicable
parry2k many thanks for your response. Your measure still wasn't completely correct because it made the first row in my example above green and the rest red. But thanks to your measure I think I was able to figure out what to do, below is my result. Does that seem right to you?
Color Measure =
VAR __originalColor = CALCULATE ( MAX ('Table'[Original color] ), ALLEXCEPT ('Table','Table'[Id] ),'Table'[Original color] <> BLANK () )
VAR _originalId = CALCULATE ( MAX ('Table'[Id] ), ALLEXCEPT ('Table','Table'[Id] ),'Table'[Original color] <> BLANK () )
RETURN
IF ( __originalColor <> BLANK () && _originalId = MAX('Table'[Id]) && MAX ('Table'[Original color] ) == BLANK (), "Green", "Red" )