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! Request now

Reply
dungtran
Regular Visitor

Could you see what's wrong with the DAX Switch function?

Hello,

   I have a very sample DAX Switch function to create a new column of Total Sales greater than 6 millions But it does not work correctly in the report. Could you please help to see why?

 

    Dax Switch function :  

 

 

Column of checking sum of list price for each country = SWITCH(true(),SUM(TrainingSample2[ListPrice])>6000000,"Sum of List Price greater than 6 Millions","Sum of List Price Below 6 Millions")

 

 

The Report

 

Screenshot 2024-05-08 155302.png

 

Thanks,

Dm

1 ACCEPTED SOLUTION
dungtran
Regular Visitor

Hello,

   Thank you. The problem is resolved. I need to use the create new measure for the calculate dax function.

DM

View solution in original post

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

Nice day!!
MMH since it's a simple condition test with an if instead, it should work

dungtran
Regular Visitor

Hello,

   Thank you. The problem is resolved. I need to use the create new measure for the calculate dax function.

DM

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors