Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

12 Month Rolling Calculation

Background forum on how I got my initial measure https://community.powerbi.com/t5/Desktop/Having-Clause-or-something-close/m-p/944351#M452558 So I'm trying to get a 12 month rolling calculation fo...
  • Anonymous's avatar
    Anonymous
    6 years ago

    I figured out a solution. Instead of duing my 12mo rolling in the same measure, I created a new measure and did it there. Don't know why but it fixed the issue.

    12Month Rolling =
    var enddate = MAX('Date Table'[Date])
    var startdate = EDate(enddate, -11)
    return calculate(
                      [pure_cemi],
                      all('Date Table'),
                      datesbetween('Date Table'[Date], startdate, enddate)
                     )