Forum Discussion

j_gan2022's avatar
j_gan2022
Frequent Visitor
4 years ago
Solved

Cumulative total

 

 

I have 3 months (Nov, Dec, Jan) that I want to have the running total of column [total_POI_per_month] . 

 

The running_total column at the snap shot should start at 190, (180+197).... then start again from next month..

I have used below code from other post to calculate the running total. But the result looks weird. Please advise.

 

Running Total MEASURE = 
CALCULATE (
    SUM ( 'Cummulative per Month'[Total_POI_Per Month] ),
    FILTER (
        ALL ('Cummulative per Month' ),
        'Cummulative per Month'[Month] <= MAX ('Cummulative per Month'[Month] )
    )

 

 

 

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi j_gan2022 

    If you want to start again from next month, you need to sum the value by month grouping with a measure .

    Running Total MEASURE = CALCULATE (SUM ( 'Cummulative per Month'[Total_POI_Per Month] ),ALLEXCEPT ('Cummulative per Month', 'Cummulative per Month'[Month]))

          

    Best Regard

    Community Support Team _ Ailsa Tao

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

3 Replies

  • j_gan2022's avatar
    j_gan2022
    Frequent Visitor

    Tahreem24 

     

    Hi, I created new measure, but the graph is not correct. 

     

     

     

    More info of code that I have tried and not working

     

    Measure 2 = CALCULATE(SUM('Cummulative per Month'[Total_POI_Per Month]),
    FILTER(ALL('Cummulative per Month'), 
    'Cummulative per Month'[Month] <= MAX('Cummulative per Month'[Month])))

     

     

     

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi j_gan2022 

    If you want to start again from next month, you need to sum the value by month grouping with a measure .

    Running Total MEASURE = CALCULATE (SUM ( 'Cummulative per Month'[Total_POI_Per Month] ),ALLEXCEPT ('Cummulative per Month', 'Cummulative per Month'[Month]))

          

    Best Regard

    Community Support Team _ Ailsa Tao

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