Forum Discussion

LewisH's avatar
LewisH
Helper II
9 years ago

Running total

I have a table called 'Service Desk List'. I Have two Measures which are 

Request = COUNTROWS('Service Desk List')

Resolved = calculate(countrows('Service Desk List'), userelationship('Service Desk List'[Resolution_Date],DateKey[Date]))

 

These get How many records have been added, and how many have been completed essentially. I need a new meausre which will get the difference between them and add it to the previous month. In my Picture below for example I would expect a line to Start at 35, then 57. 

 

 

17 Replies

  • vanessafvg's avatar
    vanessafvg
    Community Champion

    LewisH  add to what of the previous month?

     

    something like this? 

     

     measure = (([request] - [resolved]) + calculate([request], previousmonth(datetable[date]))  )

     

    (for the second part of the statement  where there is calculate you need to be specific of what you want to add it to

     

     

    • vanessafvg's avatar
      vanessafvg
      Community Champion

      LewisH

      however if you wanting a running total

       

      for example

       

      measure = calculate([request], filter(datetable, datetable[date] <= max(datetable[date]))

    • LewisH's avatar
      LewisH
      Helper II

      So We take the first month and we can see the Requested 78 - the Resolved 43 = 35.

      In the second month we have 141 requested and 119 resoloved, leaving 22. So the new measure should show 35 + 22 = 57.