Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
LewisH
Helper II
Helper II

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. 

 

147.PNG

 

17 REPLIES 17
vanessafvg
Community Champion
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

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




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.

@LewisH have you tried the above?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




I got this result which appears to be calculating the difference but not applying this to the previous difference. 

 

148.PNG

@LewisH which one did you use?  please specify how you wrote the  measure it required adjsutment probably





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




If I was to use this 

Qty. Live2 = (([request] - [resolved]) + CALCULATE([request] - [Resolved], PREVIOUSMONTH(DateKey[Date])  ))

How can I chage this to only apply when the value's (Request and Resolved) aren't both blank? 

@LewisH

 

did you try the running total? (i adjusted it slightly_

 

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





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




@LewisH

 

sorry my bad i left out the all

 

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





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Thnak you again for your help, hopefully we will get there. I'm personally confused on what to do next. I have been left with this. 

The first data Entry is in April, previous dates should be ignored.

151.PNG

@LewisH is there any chance you can share your pbix with me?  you can send it to me privately 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Yes sure, where can I send it? 

However my data comes from Navision, so I don't know how you would connect / get the data?? 

Thank you for this response.  I've applied this and it gives me this result

149.PNG

 

The first Date (35) Is correct. However I would expect the second Date to say 55 as it should get the new total (Requested - Resolved) as it does but then apply the 35 from the previous month into the calculation. I hope that makes sense. Thsi way we can see the Live differercne betwen them and hopefully see it go down over time. 

@LewisH can you change the results to a table so i can see what its doing, also put the request and resolved amounts in

 

so 

date, requested, resolved, cummulative measure in a table format thanks





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Here you are. 

Measure should read 35, 55, 50 

150.PNG

 

Thanks for your help. 

I used

Qty. Live = (([request] - [resolved]) + CALCULATE([request] - [Resolved], PREVIOUSMONTH(DateKey[Date]) )).

 

I guess it's this part which I'm not understanding correctly..

CALCULATE([request] - [Resolved], PREVIOUSMONTH(DateKey[Date]) )).

 

@LewisH

however if you wanting a running total

 

for example

 

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





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.