Forum Discussion

daxreport's avatar
daxreport
Frequent Visitor
3 years ago
Solved

VAR Statement and Time Intelligence

Hello,    I have an issue with using time intelligence function and VARIABLES.    Below code works fine:    PY Volume = CALCULATE ( [BlendedQty], SAMEPERIODLASTYEAR ( DIM_CALENDAR[Date] ) ) ...
  • eliasayyy's avatar
    3 years ago

    Hello daxreport 

    When calculated as a variable first it is in the evaluation context of the visual.  Putting the variable inside the CALCULATE(variable, SAMEPERIODLASTYEAR(...  does not recalculate the expression in the desired new evaluation context.