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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Saffira
New Member

SWITCH formula

Hi, I have a problem with the switch formula.

I would like to list different margin groups.

I have included a separate table in the query, namely:

Saffira_0-1690982031782.png

 


I have the following switch formula:

Saffira_1-1690982078424.png

 

The problem is that the categories are not caught properly. For example, in a table I see someone with a 10% margin still listed with the from 15% and above.
How can I solve this? Thanks in advance!

3 REPLIES 3
Saffira
New Member

Hi @rubayatyasmin,

 

Thank you for your reply.

 

I am quite new to Power BI and still have a lot to learn.

How do I check conditions from highest to lowest?

I do see that something goes wrong when I put it in an matrix. It looks like this:

Saffira_1-1691134586783.png

 

How can I fix this?

Thanks in advance!

 

@Saffira 

 

By try checking highest to lowest I meant to reverse your switch statements condition. Like write >15% first then <=10-15% then <= 8-10% and so on. 

 

rubayatyasmin_0-1689517080227.png


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


rubayatyasmin
Community Champion
Community Champion

Hi, @Saffira 

 

try checking the conditions from highest to lowest. 

 

rubayatyasmin_0-1689517080227.png


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


Helpful resources

Announcements
December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.