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

Do unused variables in measures cause performance issues?

Hello! 

 

Just a general question...I'm wonder if unused variables not used after the "RETURN" might cause DAX to evaulate slower?

 

Thanks!

1 ACCEPTED SOLUTION
DataInsights
Super User II
Super User II

@jordancole0517,

 

My understanding is that unused variables don't impair performance due to "lazy evaluation", meaning that a variable isn't evaluated until its first use. See the article below, as well as the comments at the end of the article for a detailed discussion:

 

https://www.sqlbi.com/articles/understanding-eager-vs-strict-evaluation-in-dax/ 

View solution in original post

2 REPLIES 2
jordancole0517
Frequent Visitor

Thanks, @DataInsights !

DataInsights
Super User II
Super User II

@jordancole0517,

 

My understanding is that unused variables don't impair performance due to "lazy evaluation", meaning that a variable isn't evaluated until its first use. See the article below, as well as the comments at the end of the article for a detailed discussion:

 

https://www.sqlbi.com/articles/understanding-eager-vs-strict-evaluation-in-dax/ 

View solution in original post

Helpful resources

Announcements
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.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Urdu Hindi D365 Bootcamp 768x460.png

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors