This article demonstrates how to show grand totals and subtotals in a visualization, as well as how to customize how those totals are calculated and where they appear in the visualization.
Show grand totals
To show grand totals in a visualization:
- Click the Analytics pane.
- In the Analytics pane, under Summarize, drag Totals into the Add Totals dialog, and drop it over either the Row Grand Totals or Column Grand Totals option.
Calculate grand totals by using a query. A grand total is the sum of all the values in a column. You can calculate several types of grand totals, including: A simple grand total that sums the values in a single column. For example, you can calculate total shipping costs. A calculated grand total that sums the values in more than one column. But you can enable and disable grand totals for rows and columns independently. Let’s take a look. When you create a new pivot table, you’ll see grand totals displayed below the table and to the right of the table. Column grand totals appear in the last row of the table, and row grand totals appear in the last column of the table. 5/2/2015 5/16/2015 6/6/2015 7/11/2015 7/25/2015 8/8/2015 8/22/2015 8/29/2015 9/26/2015 Grand Total 3 Travis Hunter 60 20 60 140 81 Kaydan Durr 10 10 89 Preston Ebersole 30 20 10 20 10 10 30 30 40 200 95 Katie Long 20 20 528 Logan Hillegass 50 50 40 40 50 40 60 50 60 440 630 Owen Weaver 20 40 20 30 110 771 Bailey Tipton 10 10 20 40.
Grand Total 5 2 603
Grand Total 500 223 45% WW SS16 Colours: Overlays Colour TQS TDSQ Contribution Qty Sold Qty Sold Contribution Sell Thru% White 12 5% 12 6% 100% Ivory 143 57% 131 67% 92% Gold 53 21% 36 18% 68% Fuchsia 41 16% 16 8% 39% Grand Total 249 195 78%. Home isolation 526 75.5% Hospitalized 14 2.0% Recovered 23 3.3% Deceased 4 0.6% Unknown 130 18.7% Grand Total 697 100.0% Table 8: Sex at birth of COVID‐19 cases in Snohomish County 8/2‐8/15/2020 Sex at birth Number Percent Female 350 50.2% Male 347 49.8% Grand Total 697 100.0%.
Row grand totals appear automatically on the right-side of the visualization. Column grand totals appear automatically at the bottom of the visualization. For information how to move where totals appear, see Move totals.
In order to turn on grand totals:
- The view must have at least one header – Headers are displayed whenever you place a dimension on the Columns shelf or the Rows shelf. If column headers are displayed, you can calculate grand totals for columns. If row headers are displayed, you can calculate grand totals for rows.
- Measures must be aggregated – The aggregation determines the values displayed for the totals. See Grand totals and aggregations for more information.
- Grand totals cannot be applied to continuous dimensions.
You can also display totals for graphical views of data. In the figure below, only column totals are calculated because the table contains only column headers.
Note: By default, totals are computed on the server if you are connected to a Microsoft Analysis Services data source, and locally if you are connected to an Essbase data source, using the aggregation specified in the cube. Refer to Configure total aggregation to learn more.
Options for calculating grand totals
When you first turn on grand totals, the totals are computed using disaggregated data in the underlying data source. Consider the following view:
The average that you see at the right of the first row under Grand Total is $339. But if you compute the average for the four values you see in the row ($329, $306, $390, $348), the result comes to $343.25, not $339. The discrepancy is due to the fact that Tableau is averaging the data in the underlying data source. In this case there are more than four numbers to average, perhaps many more. The result is derived by averaging all values that have the properties Ship Mode = First Class, Category = Furniture, without regard to region.
To see totals that correspond to the numbers you see in your view requires two averaging operations in Tableau: first, values for the individual marks (or cells) in the view must be derived—for example, by averaging all values that have the properties Ship Mode = First Class, Category = Furniture, and Region = Central. Then the results for each region must be derived, by averaging the results for the individual marks. Fortunately, you do not need to perform two operations. To display a result of this type, from the Analysis menu choose Totals > Total All Using > Average . Now the average is performed on the values you see, and not on the disaggregated date in the data source:
This kind of total is sometimes referred to as a two-pass total, because the average you see in the grand total column is aggregated twice--once to derive the column or row value, and then again across column or rows to derive the grand total.
Grand totals and aggregations
When you turn on grand totals, the initial values are computing using the current aggregation for the fields in the view. In this case, totals are based on the underlying data rather than the data in the view.
For example, if you are totaling the SUM(Profit) for several products, the grand total will be the sum of the sums of profit. For aggregations such as SUM, you can easily verify the grand total because a summation of a group of sums is still a summation. However, be aware that your results may be unexpected when using other aggregations, especially custom aggregations. For details, See Configure total aggregation. You can verify any calculation such as an aggregation or a grand total by viewing the underlying disaggregated data.
The following table summarizes the standard aggregations and the grand totals that are calculated by default when, from the Analysis menu, Totals >Total All Using is set to the default value Automatic.
Note: Only Automatic totals are available for table calculations and fields from a secondary data source. Total aggregations cannot be applied to table calculations or fields from a secondary data source.
For more information, see Showing Grand Totals with Blended Data(Link opens in a new window) and Grand Totals and Subtotals Do Not Show Expected Numbers With Table Calculations(Link opens in a new window) in the Tableau Knowledge Base.
For more information, see Showing Grand Totals with Blended Data(Link opens in a new window) and Grand Totals and Subtotals Do Not Show Expected Numbers With Table Calculations(Link opens in a new window) in the Tableau Knowledge Base.
Aggregation | Calculation Description |
---|---|
Sum | Shows the sum of the values shown in the row or column. |
Average | Shows the average of the values shown in the row or column. |
Median | Shows the median for the values shown in the row or column. |
Count; Count Distinct | Shows how many values or distinct values are displayed in the rows and columns in the view. |
Minimum | Shows the minimum value shown in the row or column. |
Maximum | Shows the maximum value shown in the row or column. |
Percentile | Shows the average percentile for all values shown in the row or column. |
Standard Deviation | The grand total using standard deviation is the standard deviation of the values shown in the row or column. |
Variance | The grand total using variance is not the variance of the rows and columns in which they reside but rather of the underlying data behind the row or column. |
Show subtotals
To show subtotals in a visualization:
- Click the Analytics pane.
- In the Analytics pane, under Summarize, drag Totals into the Add Totals dialog, and drop it over Subtotals.
Move totals
By default, row grand totals and subtotals appear on the right of the view, and column grand totals and subtotals appear at the bottom of the view.
In Tableau Desktop, you can also select to display totals on the left or top of the view.
To move row totals to the left of the view:
- Select Analysis > Totals, and then select Row Totals to Left.
To move column totals to the top of the view:
- Select Analysis > Totals, and then select Column Totals to Top.
Configure total aggregation
When totals are turned on in the visualization (either grand totals, subtotals, or both), you can specify how totals should be computed. For example, you can choose to calculate totals using a sum, average, minimum, or maximum.
To configure all totals:
- Select Analysis > Totals > Total All Using, and then select an aggregation from the list.
To configure totals for a specific field:
- Right-click (Control-click on a Mac) a field in the view, select Total using, and then select an aggregation from the list.
When you choose Automatic, totals are based on the underlying data, which is disaggregated, and not on the data in the view. See Options for calculating grand totals. For details on how Tableau computes totals using the current aggregation, see Grand totals and aggregations.
When you choose any of the other values (Sum, Average, Minimum, or Maximum), all totals are computed using the selected aggregation. The computations are performed on the aggregated data you see in the view.
An additional value, Server, may be available. Server computation is not always available and sometimes the totals will be blank for specific members in the view. When using server computation keep in mind the following information:
- Server computation is only available for ASO cubes.
- Server computation is not available for dynamic hierarchies. This means that if the members in the view are part of a dimension or hierarchy that is tagged as dynamic, they cannot be included in the set of values you are using to compute the totals and will show up as blank in the view.
- If you are computing totals for a calculated field whose formula makes assumptions about other calculated members at different levels in the hierarchy, the totals will display as blank in the view.
See Also
How to show multiple grand totals in pivot table?
Grand Total 5 2 60 Inch
When you create a pivot table, there will be one grand total at the bottom of the pivot table by default. Sometimes, you want to show multiple grand total calculations, such as Sum, Count, Average and so on. Do you have any good ideas to solve this task in Excel?
Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
Grand Total 5 2 60 +
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
- Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
- More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
- Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
- Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
- Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
- Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
- More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.
Show multiple grand totals in pivot table
Amazing! Using Efficient Tabs in Excel Like Chrome, Firefox and Safari!
Save 50% of your time, and reduce thousands of mouse clicks for you every day!
There is no direct way for you to add multiple grand totals in pivot table, as a workaround, you can use another field that acts as the grand total, and display multiple Grand Totals. Please do with following steps:
1. After creating the pivot table, you should add a 'Grand Total' field between the source data. In the source data, insert a new column between the data, name the heading as “Grand Total”, and then leave this column blank, except for the heading. See screenshot:
2. Refresh the pivot table by right clicking one cell in the pivot table and choose Refresh, and the new field will be add to the Choose fields to add to report: list box, check and drag the Grand Total field to the Row Labels list box, and put it at top. See screenshot:
3. And a new field blank label will be displayed at the top of the pivot table, select it, and press space bar on the keyboard.
4. After pressing the space bar, put the cursor on other place and then go back to select this new field label cell again, right click it, and choose Subtotal “ Grand Total”, and then the grand totals for subtotal will be displayed, see screenshots:
5. Next, you should show the subtotals at the bottom of the pivot table, please click any one cell in your pivot table, and then go to Design tab, and click Subtotals > Show all Subtotals at Bottom of Group, see screenshots:
6. After showing the subtotals at bottom in the pivot table, you can select multiple function for your subtotals. Right click the Total label cell, and choose Field Settings from the context menu, see screenshot:
7. In the Field Settings dialog box, under Subtotals &Filters tab, please check Custom, and then select the multiple functions that you need in the Select one or more functions list box, see screenshot:
8. Then click OK to close this dialog, and the multiple functions have been displayed at the bottom in the pivot table, just like the grand totals, see screenshot:
9. Finally, you need to hide or remove the original grand total. Right click the Grand Total label cell at the bottom of the pivot table, choose Remove Grand Total from the menu, see screenshot:
![Total Total](https://i.ytimg.com/vi/g2PbTomhIRU/maxresdefault.jpg)
Related articles:
The Best Office Productivity Tools
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
- Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
- Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
- Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
- Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
- Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
- Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
- Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
- Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
- More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Grand Total 5 2 607
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
- To post as a guest, your comment is unpublished.ggttfrff this is another post. You are great
- To post as a guest, your comment is unpublished.hello please don't bother me anymore. I am having a bad day. Thanks
- To post as a guest, your comment is unpublished.whats wrong with you?