How to Use a Pivot Table to Calculate the Running Total by Date in Excel – 3 Methods

The dataset below showcases sales and profit of a company in different dates.

excel pivot table running total by date


Method 1 – Using the Value Field Settings to Create the Running Total by Date

To see the running totals of sales on individual dates:

Steps:

  • Select B4:D12 and go to Insert >> Pivot Table.
  • In the dialog box, click Ok.

  • A new sheet will open with the Pivot Table fields and Areas.

excel pivot table running total by date

  • Drag the Dates field into the Rows.

  • You will see the Months section in the Rows.
  • To see running totals by date, remove the Months.

excel pivot table running total by date

  • Drag the Sales field two times to Values. You will see two sections- Sum of Sales and Sum of Sales2.

  • Select Sum of Sales2 and go to Value Field Settings.

excel pivot table running total by date

  • Name your running total column in the Custom Name section. Here, Running Total of Sales.
  • Choose Show Values As.
  • Click the arrow in Show Values As and select Running Total In.

  • Choose the Base Field as Date and click OK.

excel pivot table running total by date

You will see the individual sales and the cumulative sales in the Pivot Table.

 


Method 2 – Grouping Dates by Month in a Pivot Table to Create a Running Total

To see the running totals of sales:

Steps:

  • Create a Pivot Table for the running totals of Sales and Dates: see Method 1.
  • Select A4:C4 in the Pivot Table and go to PivotTable Analyze >> Group >> Group Selection 

excel pivot table running total by date

  • Set the date in the Grouping dialog box in the ‘Auto’ section and choose Month in ‘By
  • Click OK.

  • Go to Running Total of Sales in ‘Values area and select Value Field Settings…

excel pivot table running total by date

  • Choose Show Values As, select Running Total In in Show Values As and set the Base field to Dates.
  • Click OK.

You will see the running totals of sales in individual dates grouped by months.

excel pivot table running total by date


Method 3 – Using an Excel Pivot Table and DAX to Calculate a Running Total by Date

To see the running totals of profits:

Steps:

  • Select B4:D12 and go to Insert >> Pivot Table

  • In the dialog box, select Add this data to Data Model and click OK.

excel pivot table running total by date

  • You will see Pivot Table fields and areas.
  • The Table name is Range.
  • Right-click it.
  • Select Add Measure.

  • In the new window, enter a name in Measure Name (Here, Running Total of Profits)
  • Enter the following Formula.
=CALCULATE(
SUM(Range [Profit]),
FILTER(ALL (Range[Dates] ),
Range[Dates] <= MAX (Range[Dates])
)
)

  • Set the Number Format to Currency and choose decimal points.
  • Click OK.

excel pivot table running total by date

The running total of profits is calculated by comparing the dates and profits. The FILTER function was used to filter the dates.

  • Drag the Date Field to Rows.

  • Check Profit and fx Running Total of Profits in Pivot Table Fields.

excel pivot table running total by date

You will see the running total of the profits and the dates.

 


Practice Section

Practice here.

excel pivot table running total by date


Download Practice Workbook


<< Go Back to Pivot Table Calculations | Pivot Table in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Meraz Al Nahian
Meraz Al Nahian

Md. Meraz Al Nahian has worked with the ExcelDemy project for over 1.5 years. He wrote 140+ articles for ExcelDemy. He also solved a lot of user problems and worked on dashboards. He is interested in data analysis, advanced Excel, statistics, and dashboards. He also likes to explore various Excel and VBA applications. He completed his graduation in Electrical & Electronic Engineering from Bangladesh University of Engineering & Technology (BUET). He enjoys exploring Excel-related features to gain efficiency... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo