Forum Discussion
Conditional formatting based on other row ?
- 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 try this measure and then use this color for background color under conditional formatting, tweak the measure as you see fit
Color Measure =
VAR __originalColor = CALCULATE ( MAX ('Table'[Color] ), ALLEXCEPT ('Table','Table'[Id] ),'Table'[Color] <> BLANK () )
RETURN
IF ( __originalColor <> BLANK () && MAX ('Table'[Color] ) == BLANK (), "Green", "Red" )
✨ Follow us on LinkedIn
Learn about conditional formatting at Microsoft Reactor
My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡