cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Pavot
Frequent Visitor

SWITCH evaluation

As of now, experiments I realized with DAX on SSAS Level 1500, make me think that in the expression :

SWITCH(intValue,

value_1, expr1,

value_2, expr2,

...

value_N, exprN

)

the evaluation engine first evaluate all expr1, expr2, ..., exprN before selecting the correct expression to return. 

 

My questions are : does it really is the case ? Is there any workaround ?

1 ACCEPTED SOLUTION

Read all about it here. https://www.sqlbi.com/articles/optimizing-if-and-switch-expressions-using-variables/



* Matt is a Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

View solution in original post

2 REPLIES 2

Read all about it here. https://www.sqlbi.com/articles/optimizing-if-and-switch-expressions-using-variables/



* Matt is a Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

View solution in original post

Thank you, I finally found this paper this morning.

 

Anyway strange behavior.

 

Again thanks for your help.

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.