Forum Discussion
DAX interpreter BUG!!!
Hi, Element115
Although variables can be used anywhere, however, their result might not be always the same. Because they are evaluated in the context in which they are written.
Please refer to this thread for more details.
Caution When Using Variables in DAX and Power BI
Best Regards,
Community Support Team _ Eason
TBH what you are saying makes no sense to me: variables
are evaluated in the context in which they are written.
Variables should be visible in the scope in which they are declared, period. Are you saying that DAX scoping isn't following what we are used to with all major programming languages out there?
In any case, all my variables are usually declared top level, ie right after the 'MeasureName = ' line. Therefore I would expect this scope to be visible all the way down to the RETURN statement.
Isn't it so?