Forum Discussion

jerryr125's avatar
jerryr125
Helper IV
1 year ago
Solved

Rolling 12 Column Monthly Calculation

Hi I am looking to do a Rolling 12 calculation in a table. Example   Table_ABC:   Date Quantity RollingTwelve 1/1/2024 8   2/1/2024 10   3/1/2024 14   4/1/2024 16   ...
  • wardy912's avatar
    1 year ago

    You could add a calculated column:

     

    RollingTwelve = 
    CALCULATE(
        SUM(Table_ABC[Quantity]),
        FILTER(
            Table_ABC,
            Table_ABC[Date] <= EARLIER(Table_ABC[Date]) &&
            Table_ABC[Date] > EDATE(EARLIER(Table_ABC[Date]), -12)
        )
    )

     

    This will give you a rolling 12 month total for each row, results as follows