What is Running Sum in Tableau?
A running sum, often called a running total, is one of the most useful calculations for analyzing trends over time. Instead of just showing you a value for a specific period, a running sum shows you the cumulative total as it builds. This article will show you exactly what a running sum is, why it's so valuable, and two straightforward methods to create one in Tableau.
What Exactly is a Running Sum (and Why Use It)?
A running sum is a calculation that adds the current value in a sequence to the sum of all the previous values. Think of it like your bank account balance. Each transaction doesn't just show up as an isolated number, it's added to or subtracted from the previous balance to give you a new, cumulative total. That’s a running sum in a nutshell.
In business analytics, it's used to answer questions about growth and progress over time, such as:
- "How are our sales accumulating toward our quarterly goal?"
- "Are we on track to hit our annual user sign-up target?"
- "What is the cumulative total of website visits our new campaign has generated day by day?"
Instead of looking at jagged, up-and-down daily or weekly data points, a running sum gives you a smooth, upward-trending line that visualizes the bigger picture of growth. It trades daily volatility for a clear view of your overall trajectory.
Method 1: The Quick Table Calculation (The Easy Way)
Tableau makes creating a running sum incredibly easy with Quick Table Calculations. This is the fastest way to get started and is perfect when you need a quick cumulative view without creating new fields in your data source.
Let's say you want to see the running total of sales throughout the year. Here’s how you’d do it step-by-step:
Step 1: Build a Basic Time Series Chart
First, create a simple line chart showing sales over time.
- Drag Order Date to the Columns shelf. Tableau will likely default this to
YEAR(Order Date). You can click the "+" on the pill to drill down toQUARTER(Order Date)and then toMONTH(Order Date). - Drag Sales to the Rows shelf. Tableau will automatically aggregate this to
SUM(Sales).
You should now have a standard line chart showing the total sales for each month.
Step 2: Apply the Quick Table Calculation
Now, we’ll convert that line chart of monthly sales into a cumulative view.
- Right-click the
SUM(Sales)pill on the Rows shelf. - From the context menu, hover over Quick Table Calculation.
- Select Running Total.
That's it! You'll see your visualization immediately change. Instead of a series of peaks and valleys representing each month's sales, you will now see an upward-curving line that shows sales accumulating month after month across the entire period.
Pro-Tip: Check Your "Compute Using" Setting
Tableau is smart, but sometimes you need to tell it how to calculate the running sum. After you apply the table calculation, you can right-click the SUM(Sales) pill again and select Compute Using. In most time-series examples, Table (across) is the correct setting, meaning it calculates the sum from left to right across your time dimension. This becomes more important when you have more complex visualizations with rows and columns.
Method 2: Creating a Calculated Field (The Flexible Way)
While Quick Table Calculations are fast, they only exist on the visualization you created them in. If you want to reuse your running total calculation in other charts or include it in other calculations, creating a reusable Calculated Field is the better option.
This method gives you a new field in your data pane that you can drag and drop just like any original data field.
Here’s how to create a running sum using a calculated field:
Step 1: Open the Calculated Field Editor
You can do this in a couple of ways:
- Go to the top menu and select Analysis > Create Calculated Field...
- Right-click on an empty space in the Data pane on the left sidebar and select Create Calculated Field...
Step 2: Write the Running Sum Formula
A calculation dialog box will pop up. Now you need to give your new field a name and enter the formula.
- Name your field. Something clear like "Running Total of Sales" is a good practice.
- Enter the formula. Tableau has a specific function for this:
RUNNING_SUM(). The formula is very simple:
This formula tells Tableau: "First, get the sum of sales for each data point in the view (e.g., each month), and then calculate the running sum of those sums."
- Click OK.
Step 3: Use Your New Calculated Field
You will now see your new field, "Running Total of Sales," in the Data pane under Measures. You can now use it just like any other measure.
Build the same time series chart as before (MONTH(Order Date) on Columns). But this time, instead of dragging the original Sales field to Rows, drag your new Running Total of Sales field to the Rows shelf.
The result will be the exact same cumulative chart you created with the Quick Table Calculation. The key difference is you now have a permanent, reusable field that you can drop into any future analysis.
Practical Example: Visualizing Cumulative Sales vs. a Target
This is where running sums really shine. Let’s say your team has a quarterly sales target of $250,000. Viewing the cumulative progress towards that goal is far more insightful than viewing standalone monthly sales.
Here's how to build a chart that shows your progress against a target.
Step 1: Create a Running Sum Chart for a Quarter
- Place your Order Date on the columns shelf, and filter it to a single quarter.
- Bring it down to a
DAY(Order Date)orWEEK(Order Date)level for more granularity. - Use either of the methods above to create a chart showing the running total of sales.
Step 2: Add a Reference Line for the Target
- Go to the Analytics pane (next to the Data pane).
- Drag Reference Line from the list and drop it onto your chart. When the options appear, drop it on the Table or Pane level.
- In the dialog box, set the Value to a Constant and enter 250000.
- You can style the line - maybe making it a different color and adding a label like "Quarterly Target." Click OK.
Now, your view not only shows the growth of your sales but also gives you immediate context. You can see your trajectory, understand how close you are to the target at any given point, and pinpoint the exact day you hit your goal.
Advanced Tip: Restarting a Running Sum Each Year
What if you want to see the cumulative sales within each year, but you want the sum to restart every January? This is a common need for year-on-year analysis. You aren't interested in the grand total since the beginning of time, just year-to-date totals.
Here’s how to set that up:
- Start with a chart that includes both YEAR(Order Date) and MONTH(Order Date) on the Columns shelf.
- Apply the Running Total Quick Table Calculation to your
SUM(Sales)pill as described in Method 1. - Initially, the line will just keep climbing from the end of the first year into the next. To fix this, right-click the pill again and select Edit Table Calculation...
- In the Table Calculation menu, under Compute Using, select Specific Dimensions.
- Check both Year of Order Date and Month of Order Date.
- Underneath, a new option will appear: Restarting every. Click that dropdown and choose Year of Order Date.
Now, close the menu. Your line chart will show the sales accumulate from January to December and then drop back down to restart the count for the next year. It gives you a perfect visual of how your cumulative growth during one year compared to another.
Final Thoughts
A running sum is a foundational tool for understanding trends, measuring progress against goals, and visualizing cumulative growth. Whether you prefer the speed of a Quick Table Calculation for fast analysis or the flexibility of a Calculated Field for reusable metrics, Tableau makes it simple to transform your standard reports into powerful trend analyses.
While mastering functions like running totals in Tableau is a valuable skill, we know it's often just one step in a long reporting process. At Graphed , we created a way to get these insights without the manual build. After connecting your data sources, you can ask for a running total using plain English. A prompt like, "Show me a running total of Shopify sales this month" instantly gives you a real-time visualization, letting you get straight to the insight without getting stuck on the setup.
Related Articles
How to Connect Facebook to Google Data Studio: The Complete Guide for 2026
Connecting Facebook Ads to Google Data Studio (now called Looker Studio) has become essential for digital marketers who want to create comprehensive, visually appealing reports that go beyond the basic analytics provided by Facebook's native Ads Manager. If you're struggling with fragmented reporting across multiple platforms or spending too much time manually exporting data, this guide will show you exactly how to streamline your Facebook advertising analytics.
Appsflyer vs Mixpanel: Complete 2026 Comparison Guide
The difference between AppsFlyer and Mixpanel isn't just about features—it's about understanding two fundamentally different approaches to data that can make or break your growth strategy. One tracks how users find you, the other reveals what they do once they arrive. Most companies need insights from both worlds, but knowing where to start can save you months of implementation headaches and thousands in wasted budget.
DashThis vs AgencyAnalytics: The Ultimate Comparison Guide for Marketing Agencies
When it comes to choosing the right marketing reporting platform, agencies often find themselves torn between two industry leaders: DashThis and AgencyAnalytics. Both platforms promise to streamline reporting, save time, and impress clients with stunning visualizations. But which one truly delivers on these promises?