Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Adding column for Rolling Average (6 month)

I need help to add a new column to my table that will show the 6 month rolling average. Date column to use is M-Y and want to get 6 month rolling average of the Order Value    
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

    Sorry for being late!
    You can try this DAX:

    _average = 
    CALCULATE(
        AVERAGE('Table'[Order Value]),
        ALLEXCEPT('Table', 'Table'[Sold To Region]),
        DATESINPERIOD(
            'Table'[M-Y],
            LASTDATE('Table'[M-Y]),
            -6,
            MONTH
        )
    )

    And the final output is as below:


    Best Regards,
    Dino Tao
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.