Forum Discussion
Condition formatting
- 1 year ago
Hi Akbera1
Can you please try this ?
Create a measure and use conditional formatting.ValueColor =SWITCH(TRUE(),MAX('Table'[Type]) = "A" && MAX('Table'[Values]) < 0.10, "#FF0000", -- RedMAX('Table'[Type]) = "A" && MAX('Table'[Values]) >= 0.10, "#00FF00", -- GreenMAX('Table'[Type]) = "B" && MAX('Table'[Values]) < 0.05, "#FF0000", -- RedMAX('Table'[Type]) = "B" && MAX('Table'[Values]) >= 0.05, "#00FF00", -- GreenBLANK())
If this answers your questions, kindly accept it as a solution and give kudos.
Hi Akbera1
Try this:
ColorFormat =
SWITCH(
TRUE(),
'Table'[Type] = "A" && 'Table'[Values] >= 0.10, "Green",
'Table'[Type] = "A" && 'Table'[Values] < 0.10, "Red",
'Table'[Type] = "B" && 'Table'[Values] >= 0.05, "Green",
'Table'[Type] = "B" && 'Table'[Values] < 0.05, "Red",
BLANK()
)
I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.
Curious to explore more? [Discover here].
Let’s keep building smarter solutions together!