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
Hi amitchandak , thanks for your suggestion. I tried to add your measure but I get the error "Operator or expression '( )' is not supported in this context." Any ideas?
amitchandak
4 years agoSuper User
Anonymous , Corrected the order , try
color =
if(isblank(max(Table[original color])) && not(isblank(countx(filter(allselected(Table), Table[car ID] = max(Table[car ID]) && not(isblank(Table[original color]))) ))) , "Green", "red")