Forum Discussion

nleuck's avatar
nleuck
Icon for Post Patron rankPost Patron
6 years ago
Solved

Running Total for Rolling 12

Hello All,

 

I'm having some trouble getting my Running Total for Rolling 12 to show up correctly in my table.

 

 

I'm trying to get the running total for Open Tickets. It shows the total running all the way through though which isn't correct. I would expect May 2019 thru Oct 2019 to be blank, then November 2019 thru January 2020 = 1, Feb 2020 thru Mar 2020 = 3, and Apr 2020 = 16

 

Here is the formula I'm using to calculate Running Total:

 

Running Total Open Tickets (Rolling 12) =
      CALCULATE([Total Open Tickets],
         DATESBETWEEN('DateCalendar'[Date],
            EOMONTH(TODAY(), -13),
            EOMONTH(TODAY(), -1)
 
Any help would be greatly appreciated.
 
Thanks!
  • Hi, nleuck 

     

    Based on your description, I assume that you want to calculate cumulative value. I created data to reproduce your scenario. The pbix file is attached in the end.

     

    You may create a measure as below.

     

    Result = 
    var _lastdate = LASTDATE(Sales[Date])
    return
    CALCULATE(
        SUM(Sales[Total Open Tickets]),
        FILTER(
            ALL(Sales),
            Sales[Date]<=_lastdate
        )
    )

     

     

    Result:

     

    Best Regards

    Allan

     

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

6 Replies