Forum Discussion
Conditional formatting with Dax
- 4 years ago
Anonymous create a new measure, called "Background COlor" and then use this measure as conditional formatting using field value
Background Color = VAR __growth = [NS Growth] VAR __change = [Working Trade Rate Chg] RETURN SWITCH ( TRUE(), __growth <0 && __change<0 && __growth <__change, "Red", __growth <0 && __change<0 && __growth >__change,"Green" __growth <0 && __change>0, "Red" __growth >0 && __change<0, "Green" )You can change the logic as you see fit, I guess this will give you an idea.
✨ Follow us on LinkedIn and to our YouTube channel
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.
Anonymous create a new measure, called "Background COlor" and then use this measure as conditional formatting using field value
Background Color =
VAR __growth = [NS Growth]
VAR __change = [Working Trade Rate Chg]
RETURN
SWITCH ( TRUE(),
__growth <0 && __change<0 && __growth <__change, "Red",
__growth <0 && __change<0 && __growth >__change,"Green"
__growth <0 && __change>0, "Red"
__growth >0 && __change<0, "Green"
)
You can change the logic as you see fit, I guess this will give you an idea.
✨ Follow us on LinkedIn and to our YouTube channel
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.