This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
IF SUM([True Audit Days]) <ATTR([MIN DAYS]) THEN 'red' ELSEIF SUM([True Days]) >ATTR([MAX DAYS]) THEN 'red' ELSE 'green' END
how to change this color coding format into power BI DAX ?
Solved! Go to Solution.
@Anonymous , to understand attr, need some sample data. As of now assumed you have measures for Min and Max days
Create a new measure and use that in conditional formatting using filed value option
Switch( true() ,
SUM([True Audit Days]) < ([MIN DAYS]) , "red" ,
SUM([True Days]) > ([MAX DAYS]) ,"red" ,
"green"
)
refer if needed
Tableau ATTR: https://www.youtube.com/watch?v=6mXMPX7S8oU&list=PLPaNVDMhUXGYzjFASXjdY7GNoFxvlkR54&index=21
How to do conditional formatting by measure and apply it on pie?: https://youtu.be/RqBb5eBf_I4
Hi, @Anonymous
Create a measure like:
ColorMeasure = SWITCH(TRUE(),
SUM([True Audit Days]) <ATTR([MIN DAYS]), 1, --see remarks below
SUM([True Days]) >ATTR([MAX DAYS]), 1,
2)
not sure what ATTR is doing, but you can replace by SELECTEDVALUE ... SELECTEDVALUE('Table'[SomeColumn],"*")
Then go to condition formatting and if is background for example, use by Rule and search for this measure. Rules will be:
If = 1, select some red color,
If = 2, select some green color
Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.
Appreciate your Kudos !!!
Proud to be a Super User!
@Anonymous , to understand attr, need some sample data. As of now assumed you have measures for Min and Max days
Create a new measure and use that in conditional formatting using filed value option
Switch( true() ,
SUM([True Audit Days]) < ([MIN DAYS]) , "red" ,
SUM([True Days]) > ([MAX DAYS]) ,"red" ,
"green"
)
refer if needed
Tableau ATTR: https://www.youtube.com/watch?v=6mXMPX7S8oU&list=PLPaNVDMhUXGYzjFASXjdY7GNoFxvlkR54&index=21
How to do conditional formatting by measure and apply it on pie?: https://youtu.be/RqBb5eBf_I4
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 35 | |
| 32 | |
| 25 | |
| 23 | |
| 16 |
| User | Count |
|---|---|
| 65 | |
| 50 | |
| 30 | |
| 24 | |
| 23 |