• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Power Pivot Running Total

You are here: Home / Power Pivot / Power Pivot Running Total
power pivot running total
July 15, 2021 by Mynda Treacy

In this tutorial we’ll look at how to create a Power Pivot running total that allows you to see the aggregation at the month, quarter and year levels enabling you to create charts like this:

Power Pivot running total chart

Note: parts of this tutorial require Power Pivot in Excel or Power BI. Check if your version of Excel has Power Pivot.

Watch the Video

Subscribe YouTube

Download Workbook

Enter your email address below to download the sample workbook.

By submitting your email address you agree that we can email you our Excel newsletter.
Please enter a valid email address.

Download the Excel Workbook and follow along. Note: This is a .xlsx file please ensure your browser doesn't change the file extension on download.

PivotTable Running Totals using Show Values As

In both regular and Power Pivot PivotTables we can use the Show Values As tools to create running totals through the right-click menu as shown below:

PivotTable Show Values As running total

However, when your data is grouped by dates as mine is, these running totals can only be displayed at one level: either Year, Quarter or Month. For example, if I choose the Year level you can see the data at the quarters level is not a running total from one quarter to the next which makes for a confusing PivotTable:

wrong running total

Instead, what we typically want is this where the quarters increment in line with the calendar year:

correct running total

PivotTable Running Totals using DAX Measure

In Power Pivot PivotTables and Power BI we can use the DAX formula language to write a measure that calculates the running total as you’d expect.

For this your data needs to be loaded to the Power Pivot Data Model, which you can select when creating the PivotTable:

add data to the data model

In my data model I have 3 tables, one for Actual Costs, Budgeted Costs and Forecast Costs and a calendar table to relate the tables together enabling me to create a single PivotTable and chart that contains data from all 3 tables:

create power pivot relationships

Now you can set up the measure via the Power Pivot tab on the ribbon > Measures > New Measure:

create power pivot measure

I’ll create the measure for the Actual Running Total first, which I’ll call Actual RT. In the Measure dialog box assign the measure to the Actual table (1), enter the name (2), formula (3), and formatting (4):

Power Pivot running total formula

Build the PivotTable being sure to use the date fields from the Calendar table and the new measure you’ve just written:

Power Pivot running total formula result

Please watch the video for step by step instructions.

power pivot running total

More Power Pivot Posts

CUBE Functions

Excel CUBE Functions

Excel CUBE Functions are a great alternative to GETPIVOTDATA for Power Pivot PivotTables and still work with Slicers.
Introduction to DAX

Introduction to DAX Measures

Introduction to DAX in Power BI and Excel. Where and how to write DAX measures, understanding filter context and more.

Toggle Top N with Slicers

Toggle Top N with Slicers using disconnected tables in Power Pivot. These easy measures allow users to choose their top n.
static data tables

Static Tables in Power Query, Power Pivot and Power BI

Use static tables to store data in Power Query, Power Pivot and Power BI without needing to load data from an external source
custom formatting strings in power bi

Custom Formatting Strings in Power BI

Control how data is displayed in Power BI using your own formats. Like hiding negative or zero values, using symbols or custom number formats
GETPIVOTDATA Function for Power Pivot

GETPIVOTDATA Function for Power Pivot

The GETPIVOTDATA Function for Power Pivot references measures and so it works a little different to GETPIVOTDATA for regular PivotTables.
values_as_%_of_another_column_thumb

Show Values as Percentage of Another PivotTable Column Total

Show Values as % of Another PivotTable Column Total can't be done with regular PivotTables, however with Power Pivot we can use a DAX measure.
Change PivotTable Aggregation Methods using Excel Slicers

Change PivotChart Aggregation Methods using Excel Slicers

Change Pivot Chart Aggregation Methods using Excel Slicers and Power Pivot. Disconnected tables and the SWITCH function are the secret sauce.
PivotTable Distinct Count

Excel PivotTable Distinct Count

Excel PivotTable Distinct Count, sometimes called ‘Unique Count’ will return a count of unique items in a field. It uses the Data Model (Power Pivot).
Power Pivot does VLOOKUP

Power Pivot does VLOOKUP

Creating PivotTables from multiple tables used to require consolidating the data into one table, but now Power Pivot does VLOOKUP, kind of. So you don't need to.


Category: Power Pivot
Previous Post:Secret Power Query Function List
Next Post:Auto Refresh PivotTables

Reader Interactions

Comments

  1. Jeremy

    December 18, 2022 at 3:17 am

    Hi,

    First – thank you for this. Great example.

    I think I may have found a flaw, however:

    Given there are 2 datasets:

    Dataset A
    ————–
    Outgoings for Apr-22 to Mar-23
    Contains two columns: [Month] and [Outgoings]

    Dataset B
    ————–
    Income for Apr-22 to Mar-23
    Contains two columns: [Month] and [Income]

    Given there are NO recorded Outgoings for Sep-22
    Given there ARE recorded Outgoings for all months other than Sep-22 (i.e. Apr-22 to Mar-23)
    Given there ARE recorded Income all year round (i.e. Apr-22 to Mar-23)
    Given a [Month] lookup has been created for each of the months Apr-22 to Mar-23

    Then: when populating a Power Pivot table, Sep-22 is blank/empty for Outgoings

    The rolling-sum works perfectly up to Aug-22 for Outgoings, then shows a blank!

    It then “picks up” again with correct calculations on the following month (Oct-22) BUT, if you attempt to perform a calculation (i.e. [Income] – [Outgoings]) you get incorrect results because the [Income] field has a value in it, but the [Outgoings] field is blank for that month (rather than a ‘repeat’ of the previous month’s amount)

    One solution (which I’d rather not implement) is to add a row into the raw/source data for Outgoings for Sep-22 with a value of zero. At least I think that would work – haven’t tried it yet.

    However, without that, how would you navigate around this issue using just the DAX?

    Looking at other comments, it seems to be the policy to forward on to your forum, so (time permitting) will do that shortly!

    Many thanks!

    Reply
    • Mynda Treacy

      December 18, 2022 at 8:14 pm

      Hi Jeremy,

      Yes, the formula is not designed to handle missing months. Please post your question and sample file on our Excel forum where someone can help you.

      Mynda

      Reply
  2. Andy Langshaw

    February 18, 2022 at 7:36 pm

    Hi – I have a worksheet with many data fields based on various incomes split in to to rows which represent each month of the year, I have created measures to show what percentage one column field is of another, however, when i change these column fields to running totals the % measure I have created stays the same, how do I create a % measure based on running total values

    Reply
    • Mynda Treacy

      February 19, 2022 at 9:03 am

      Hi Andy,

      Please post your question and sample Excel file on our forum where we can help you further: https://www.myonlinetraininghub.com/excel-foruma

      Reply
  3. Martin

    January 8, 2022 at 7:50 pm

    Great explanation of running total, it worked flawlessly. If I wanted to add a second or third criteria to the filter, e.g. only sum values for Actual RT with table[other_column] = “x”, how would I do that?

    Reply
    • Mynda Treacy

      January 9, 2022 at 10:18 am

      Hard to say without seeing your file. Please post your question on our Excel forum where you can also upload a sample file containing your data model and illustrating your desired result, and we can help you further.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Current ye@r *

Leave this field empty

Sidebar

More results...

Featured Content

  • 10 Common Excel Mistakes to Avoid
  • Top Excel Functions for Data Analysts
  • Secrets to Building Excel Dashboards in Less Than 15 Minutes
  • Pro Excel Formula Writing Tips
  • Hidden Excel Double-Click Shortcuts
  • Top 10 Intermediate Excel Functions
  • 5 Pro Excel Dashboard Design Tips
  • 5 Excel SUM Function Tricks
  • 239 Excel Keyboard Shortcuts

100 Excel Tips and Tricks eBook

Download Free Tips & Tricks

Subscribe to Our Newsletter

Receive weekly tutorials on Excel, Power Query, Power Pivot, Power BI and More.

We respect your email privacy

Guides and Resources

  • Excel Keyboard Shortcuts
  • Excel Functions
  • Excel Formulas
  • Excel Custom Number Formatting
  • ALT Codes
  • Pivot Tables
  • VLOOKUP
  • VBA
  • Excel Userforms
  • Free Downloads

239 Excel Keyboard Shortcuts

Download Free PDF

Free Webinars

Excel Dashboards Webinar

Watch our free webinars and learn to create Interactive Dashboard Reports in Excel or Power BI

Click Here to Watch Now

mynda treacy microsoft mvpHi, I'm Mynda Treacy and I run MOTH with my husband, Phil. Through our blog, webinars, YouTube channel and courses we hope we can help you learn Excel, Power Pivot and DAX, Power Query, Power BI, and Excel Dashboards.

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk – For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.