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
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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.

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors