Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi,
I am losing my mind trying to figure out what's happening with this switch() statement.
If I am switching the order of each condition/ line, I get different values, but never the proper one - i.e. the entire list.
Solved! Go to Solution.
Overlooking the order of conditions in the SWITCH statement can lead to unexpected results, as the SWITCH function evaluates the conditions in the order they are defined and uses the first matching condition.
Ensure that each case appears in the correct sequence, just like you would do with nested IF statements.
Proud to be a Super User! | |
Yeah, I realized that. I'm working in the fix.
There are also overlaps. It's a pretty complex data set.
I'm good. Thank you.
Overlooking the order of conditions in the SWITCH statement can lead to unexpected results, as the SWITCH function evaluates the conditions in the order they are defined and uses the first matching condition.
Ensure that each case appears in the correct sequence, just like you would do with nested IF statements.
Proud to be a Super User! | |
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.