Forum Discussion
cooksteve09
4 years agoFrequent Visitor
Conditional Formatting using calculated measure
Please help!! What i am after seeing in the "If_Red" column is, if the value has increased on previous week then green, red if decrease and blue if equal, below is an example of my data and my ca...
- 4 years ago
Please try:
Column = var current_ = 'Table'[Index] var next = current_+1 var base_line = MAX('Table'[Index]) var current_value = 'Table'[filled] var next_value = CALCULATE(SUM('Table'[filled]),FILTER('Table','Table'[Index]=next)) return SWITCH(TRUE(), 'Table'[Index]=base_line,"black", current_value>next_value,"green", current_value<next_value,"red", current_value=next_value,"blue" )
parry2k
4 years agoSuper User
cooksteve09 Just tweak the condition in the switch function based on your logic and it should work, you can add more conditions as per the business logic, not sure if you are unable to do that basic value condition stuff. You have the ides in the solution, just tweak it.
✨ Follow us on LinkedIn
Check 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.⚡