Forum Discussion

dedelman_clng's avatar
dedelman_clng
Icon for Community Champion rankCommunity Champion
7 years ago
Solved

calculate "around" a variable

I am attempting to use variables within a measure, but not getting the desired results.  I've looked around at all kinds of DAX reference material and can't figure out why this doesn't work.  I know ...
  • AlB's avatar
    7 years ago

    Hi dedelman_clng

    A variable in DAX is actually a constant. Unlike variables in other programming languages, once you declare a variable in DAX by assigning it a value, that value is immutable. Your variable __TodayVal in the CALCULATE for __PrevVal will not be affected at all by the filter argument.