How to Add Subtotals in Tableau
Adding subtotals in Tableau transforms a simple data table into a powerful summary, giving readers at-a-glance insights without needing to decipher every row. It's a fundamental skill for building clear, useful reports and dashboards. This guide will walk you through the simplest drag-and-drop methods for adding and customizing subtotals to make your data stories even more compelling.
What Are Subtotals and Why Use Them?
In Tableau, subtotals are summary rows or columns that calculate an aggregate value (like a sum, average, or count) for a subset of your data. Think of a financial report showing sales across different regions and product categories. A subtotal could quickly show you the total sales for the "East" region before you even look at the individual product sales within it.
Using subtotals is all about efficiency and clarity:
- Better Readability: They break up long tables of data, making them less intimidating and easier to skim.
- Quick Context: Subtotals provide immediate context by showing the performance of a group, which helps in comparing different segments.
- Deeper Analysis: They allow you to analyze data at multiple levels of granularity within a single view, from the broad overview to the nitty-gritty details.
The One-Click Method: Adding All Subtotals
Tableau makes adding basic subtotals incredibly simple. If you just need a standard sum for every grouping in your table, this is the fastest way to get it done.
Let's use a common example: a text table showing Sales by Region and Category.
- On your worksheet, you've dragged Region and Category to the Rows shelf, and SUM(Sales) to Text on the Marks card. This gives you a detailed table but no summary values.
- Navigate to the top menu bar over your workbook.
- Click on Analysis.
- In the dropdown menu, hover over Totals.
- Select Add All Subtotals.
Instantly, Tableau adds a "Total" row under each Region, summing up the sales for all categories within that region. Just like that, you have a summarized view. This single click tells Tableau to calculate totals for every dimension on your Rows and Columns shelves, working its way from the innermost dimension outward.
Free PDF · the crash course
AI Agents for Marketing Crash Course
Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.
How to Selectively Add Subtotals for Specific Fields
What if you don't want totals for every dimension? Maybe your table has Region, State, and City, but you only care about seeing subtotals for each Region, not each State. Overloading a table with too many totals can create noise and make it hard to read. Tableau gives you granular control over this.
Instead of using the top menu, you can enable subtotals directly from the pill on the Rows or Columns shelf.
- Find the discrete (blue) dimension pill on your Rows or Columns shelf for which you want to add totals. For our example, this would be the Region pill.
- Right-click the pill to open its context menu.
- Find and check the option labeled Subtotals.
Tableau will now add subtotals only for that specific dimension, ignoring any others in the view. You can repeat this process for any other dimension pills where you want to see a summary, giving you complete control over the layout of your report.
Customizing Your Subtotals
Adding subtotals is just the first step. To create professional and easy-to-understand reports, you'll want to format and customize them.
Changing the Subtotal Aggregation
By default, Tableau calculates subtotals using the same aggregation as the measure in your view. If you are using SUM(Sales), your subtotals will be a sum. But what if you want the subtotal row to show the average sales value for the region, not the total?
- Go back to the top menu and click Analysis.
- Hover over Totals.
- Select Total All Using (...).
- A sub-menu will appear with options like Sum, Average, Minimum, and Maximum.
- Select Average.
Now, your subtotal rows will calculate the average of the values in that group. This is incredibly powerful for certain kinds of analysis. For example, you could show daily sales figures but have the weekly subtotal presented as an Average to understand the typical performance for that week, rather than the raw Sum.
A Quick Note on How Tableau Calculates: It's important to understand that Tableau calculates totals and subtotals based on the underlying data for that group, not just by adding up the numbers visible on your screen. This is crucial when using non-additive aggregations like COUNTD() (Count Distinct) or AVG(). For a distinct count of customers, the subtotal won't be the sum of the rows, it will be the true distinct count of all customers within that group, preventing double counting.
Moving Subtotals and Grand Totals
Traditionally, subtotals appear at the bottom of a group and Grand Totals appear at the very bottom (for columns) or to the far right (for rows). Depending on your audience and the story you're telling, it might make more sense to present the summary information first.
You can easily move these totals to the top or left:
- Click on Analysis in the top menu.
- Hover over Totals.
- Select either Row Totals to Left or Column Totals to Top.
Placing totals at the top is common in financial reports, as it allows executives to see the high-level summary number before looking into the detailed breakdown.
Formatting the Look and Feel of Subtotals
Default formatting is fine, but custom formatting can make your totals pop and guide your reader's eye. You can change everything from the label text to the background color.
- In your view, find a subtotal label or value.
- Right-click on it and select Format....
- The Format pane will open on the left side of your screen. This is your central hub for all styling.
- In the Format pane, make sure you're in the Totals or Grand Totals section (using the dropdown at the top).
- You can now adjust several properties:
A common best practice is to make subtotals bold and apply light gray background shading to visually separate them from the detail rows. This small touch dramatically improves readability.
Free PDF · the crash course
AI Agents for Marketing Crash Course
Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.
Advanced Techniques: Creating Custom Subtotals with LODs
Sometimes, the built-in subtotal functionality doesn't quite meet a specific reporting need. For instance, what if you want to show a regional total on every row within that region, to compare a category's performance against its regional summary?
This is where Level of Detail (LOD) expressions come in. They let you calculate aggregate values that are independent of the dimensions in your view.
Let's create a calculated field that gives us the total sales for each region.
- Open the calculated field editor by clicking the down arrow in the Data pane and selecting Create Calculated Field....
- Name your calculated field something intuitive, like "Regional Sales Total".
- Enter the following
FIXEDLOD calculation:
{ FIXED [Region] : SUM([Sales]) }
- Click OK.
What does this formula do? It tells Tableau: "For every distinct [Region], calculate the total SUM([Sales]) and 'fix' that value to the region."
Now, you can drag this new "Regional Sales Total" calculated field into your view alongside your standard SUM(Sales). It will appear on every single row, showing the total for the corresponding region. This isn't a subtotal "row," but it achieves a similar goal by providing a summarized value for comparison at a deeper level of detail.
Final Thoughts
You've now seen how to add, control, and format subtotals in Tableau, from the quick and easy one-click method to crafting custom summaries with calculated fields. Using subtotals effectively is a simple but powerful way to enhance your reports, turning walls of numbers into easy-to-digest summaries that help stakeholders make faster, smarter decisions.
Tools like Tableau provide incredible power, but they still require you to navigate menus, right-click pills, and understand concepts like aggregation and LODs. At Graphed, we're simplifying this process entirely. Instead of clicking through menus to add subtotals or grand totals, you can just ask for them in plain English. For example, you could ask, "Show me monthly sales by product category with subtotals for each quarter," and we instantly build the interactive chart for you, summaries included, connected directly to your live data.
Related Articles
Facebook Ads for Photographers: The Complete 2026 Strategy Guide
Learn how to effectively use Facebook Ads to book more photography clients in 2026. Complete guide covering targeting, budgeting, and campaign setup.
Facebook Ads for Pest Control: The Complete 2026 Strategy Guide
Learn how to run effective Facebook ads for pest control companies in 2026. This comprehensive guide covers campaign setup, targeting strategies, cost benchmarks, and best practices for generating quality leads.
Facebook Ads for Carpet Cleaners: The Complete 2026 Strategy Guide
Learn how to run Facebook ads for carpet cleaning businesses in 2026. Get proven strategies for targeting, creative formats, retargeting, and budget that actually convert.