Running Totals in Pivot Table

alexjmeyer

New Member
Joined
Dec 1, 2015
Messages
4
Hi!

I have a set of data that gives a date/time, item and sale qty (a small sample below). I'm trying to use a pivot table / chart that is grouped by day and hour along with a running total to see the cumulative total of sales by item over time. In this particular case the data spans three days. Currently the running total is resetting at each date transition but for this use I want to be able to see the running total continue across the date transitions. Any help?

Date / TimeItemSale Qty
1/1/2015 4:33AM12
1/1/2015 1:33AM13
1/1/2015 2:33AM14
1/2/2015 5:10AM11
1/2/2015 7:10AM15
1/2/2015 6:10PM17
1/3/2015 2:15PM11
1/3/2015 3:15PM14
1/3/2015 9:15PM13

<colgroup><col><col span="2"></colgroup><tbody>
</tbody>
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
it appears your date/time is text and probably won't group by day correctly in the pivot table.
you would need to probably correct that in your raw data by inserting a space between the time and am/pm elements.

could probably do this easiest with find/replace ....so replace "AM" with " AM" and the same for "PM"

once thats corrected you should be able to group by days...

with date/time and item in rows drag sale qty to values twice...right click on one of them and go to value field settings....show values as....running total in from the drop down and date/time as the base field.
 
Upvote 0
Currently in the data set the order timestamp is formatted as a date and there is a space between the Time and AM/PM.

However, I still have the issue that the running totals reset at the date transitions. If I just group by order date it gives me no issues, but when I group by date and hour that's when the problem happens. Any other ideas?
 
Upvote 0
Are you using "Running Total" by Item(field) or by Date/Time(field)?
 
Upvote 0
it seems to work fine as long as its grouped on either the day or the time but when they are grouped together it starts the total over for each day.
 
Upvote 0
I am successfully grouping by day and having a running total.
Maybe some detail difference in how we're setting up the PT, but I believe the desired result is possible.
 
Upvote 0
I give up....
I get a similar result if I place the Hour part in the Columns section, but that note great.
I used a helper cell to group the date and times by hour by rounding.

Still disappointed by the limited scope of the running total.
 
Upvote 0
Thanks for the help... Its definitely appreciated. I also tried creating a manual reference similar to the solution for running totals across year transitions but had no luck.
 
Upvote 0

Forum statistics

Threads
1,215,679
Messages
6,126,186
Members
449,296
Latest member
tinneytwin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top