Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Unable to conditionally format a column which is produced by a measure

Hello,

 

I'm trying to conditionally format a column in my Measure table, to assign colors or Tags(achieved or breached). However the conditional formatting doesn't seem to be working.  I'm trying to compare a measure cloumn and display "Achieved" when the value is more than 90% and Breached when the value is less than 90%. But everything seems to be getting evaluted Breached though it is not suppossed to.

Madhun_3-1608898001311.png

Madhun_2-1608897944527.png
This is how my conditional table looks like:

 

Madhun_0-1608897469334.png

 

Kindly help to resolve this problem.

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@Anonymous in your switch statement change 90 to .9 (90% = .9 as a number value) and that will do the job.

 

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.

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

9 REPLIES 9
AllisonKennedy
Super User
Super User

@Anonymous  Your original SWITCH statement is fine. Please try what @parry2k has suggested and change the value to 0.9 instead of 90. 


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

parry2k
Super User
Super User

@Anonymous in your switch statement change 90 to .9 (90% = .9 as a number value) and that will do the job.

 

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.

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Hi @parry2k ,

Thank you so much, it resolved my issue.

 

Madhun_0-1608972219146.png

Madhun_1-1608972252761.png

 

CNENFRNL
Community Champion
Community Champion

@Anonymous , Power BI is so far not intelligent enough to guess that here 90 means  90% ...


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

aj1973
Community Champion
Community Champion

Hi @Anonymous 

Try using IF formula instead of switch:

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Anonymous
Not applicable

Thanks for the reply, I have tried both IF and Switch but it is not working. It seems to be a problem with comparing Measure output. My measure output is not being compared with all the conditions in switch or if.

 

See below example:

Madhun_0-1608901419246.png

 

Madhun_1-1608901459692.png

 

aj1973
Community Champion
Community Champion

Eleminate SELECTEDVALUE from your var apps = 'KPI [AppsP1P2%]. it should work

 

Or Try using the desktop to settle your formating

aj1973_0-1608902509292.png

 

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

@aj1973  Amine you have the right idea here using 0.9, but you must use 'number' option not 'percent' in the conditional formatting. This is a common mix up - the rules for conditional formatting in Power BI are not intuitive! 🙂


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

@AllisonKennedy 

Indeed

Thanks

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors