Forum Discussion

mohittimpus's avatar
mohittimpus
Icon for Helper V rankHelper V
6 years ago
Solved

Exact 12 month rolling

Hello... I need exact 12 month rolling data. I have data from January  2019 to May 2020. In my data some month are missing in 2019 (may 2019 and june 2019). So I want include that missing month al...
  • v-lionel-msft's avatar
    6 years ago

    Hello @mohittimpus ,

    You can do this.

    last 12 month average = 
    VAR x = 
    CALCULATE(
        SUM(employee[value]),
        DATESINPERIOD( employee[Date], MAX(employee[Date]), -12, MONTH )
    ) 
    RETURN
    x/12

    v-lionel-msft_0-1600073359943.png

    Best regards
    Lionel Chen

    If this post helps,then consider Accepting it as the solution to help other members find it faster.