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

Switch True DAX measure not returning correct results

Hi Expert

 

i am not getting the correct result for Managed Services and Professional Services when using the Switch funtion in the below DAX - would expect MS to be 7% Higher then the [Sales Forecast] but its not.

Forecast Test 1 =
Switch(TRUE(),
max(FACT_NEWBI_NewSalesDashboard[OrderType]) = "Managed Services" , [Sales Forecast]*1.07,
max(FACT_NEWBI_NewSalesDashboard[OrderType]) = "Professional Services" , [Sales Forecast]*1.08,
[Sales Forecast]
)
 
1 ACCEPTED SOLUTION

HI @Anonymous ,

 

Tried this on a sample Data.

 

12.JPG

 

Regards,

Harsh Nathani

View solution in original post

6 REPLIES 6
harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

The DAX looks correct. Can you share a screenshot of the result the DAX is returning.

 

Forecast Test 1 =
SWITCH (
    TRUE (),
    MAX ( FACT_NEWBI_NewSalesDashboard[OrderType] ) = "Managed Services", [Sales Forecast] * 1.07,
    MAX ( FACT_NEWBI_NewSalesDashboard[OrderType] ) = "Professional Services", [Sales Forecast] * 1.08,
    [Sales Forecast]
)

 

Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Anonymous
Not applicable

Hi harsh....see scren image there should be a difference by 7 & 8 percent but the number are the same. for MS and PS

Route111_0-1640094299849.png

 

Hi @Anonymous ,

 

Looks great. Can you share a sample of the .pbix file.

 

Also, did you try TRIM and CLEAN in POWER Query.

 

Regards,

Harsh Nathani

Anonymous
Not applicable

Hi Harsh ....sorry cannot upload file even sample duw to upload restrictions - below is another measure i tried and does also not work.. I have check for space using TRIM and Clean and we are good....

Measure 2 = 
SumxValues(FACT_NEWBI_NewSalesDashboard[OrderType]) ,
[Sales Forecast]*Switch(TRUE(),

max(FACT_NEWBI_NewSalesDashboard[OrderType]) = "Managed Services" , 1.07,

max(FACT_NEWBI_NewSalesDashboard[OrderType]) = "Professional Services" , 1.08,

[Sales Forecast]) )

HI @Anonymous ,

 

Tried this on a sample Data.

 

12.JPG

 

Regards,

Harsh Nathani

Anonymous
Not applicable

Thanks Harsh - Excellent feedback sir, much appericated....

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