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
Axiomite
Resolver II
Resolver II

SWITCH Function and Power Bi value calculations

Hi there, 

 

I've been running into problems where I use a switch function and it seem to be skewing my end result, especially where multiplication takes place with a value derived from a switch fucntion. I am unable to replicate my issue with my dummy data and cannot share the sensitive data. However I've attached a link to a pbix and dummy data in Excel. 
1. Instead of switch in Dax I can do this in SQL and and get my end result with basic Dax.

2. Being said I can solve with SQL, can you see if I took the correct approach with DAX, as this is bothering me and would love a better understanding? I get confused with the SUM, Dont summarize etc and this seems to have an effect on the end result. 

Axiomite_0-1708670662990.png

Link to dummy data: 

https://drive.google.com/drive/folders/1Kev8YiUNUUyCYRxW7XkxXYWlAagXwWL0?usp=sharing 

 

2 REPLIES 2
Daniel29195
Super User
Super User

@Axiomite 

can you explain the logic of the code you are trying to write ? 
like what do you want to calculate  ? 

@Daniel29195 
are you able access my shared documents? I've added another worksheet on the shared excel file, this will show you what I want to calculate. Thanks for your time.

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