Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

How to calculate a rolling total

 I need to get a rolling total by month for the Result below. Can someone show me how to accomplish this. I'm currently using a slicer for the dates.          ValueA                ValueB         Re...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

     

    A calendar table is needed for the model.

    And please create a new measure like:

    Result = 
    CALCULATE (
        SUM ( 'TableA'[ValueA] ) + SUM ( 'TableB'[ValueB] ),
        'Calendar'[Month Num] <= MAX ( 'Calendar'[Month Num] ),
        REMOVEFILTERS ( 'Calendar'[Month] )
    )

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group