Grand Totals and Subtotals: How They Work, How to Make Them Work for You
description
Transcript of Grand Totals and Subtotals: How They Work, How to Make Them Work for You
![Page 1: Grand Totals and Subtotals: How They Work, How to Make Them Work for You](https://reader036.fdocuments.in/reader036/viewer/2022062305/5681660d550346895dd94ac0/html5/thumbnails/1.jpg)
Grand Totals and Subtotals:How They Work,
How to Make Them Work for You
Jonathan DrummeyQuality Management Data Analyst
Southern Maine Medical [email protected]
![Page 2: Grand Totals and Subtotals: How They Work, How to Make Them Work for You](https://reader036.fdocuments.in/reader036/viewer/2022062305/5681660d550346895dd94ac0/html5/thumbnails/2.jpg)
Teaching you to fish:–How Tableau computes grand totals and
subtotals– TOTAL vs. WINDOW_ and RUNNING_ table
calcs
Giving you the fish:–How to customize your own grand total–How v8 is different
![Page 3: Grand Totals and Subtotals: How They Work, How to Make Them Work for You](https://reader036.fdocuments.in/reader036/viewer/2022062305/5681660d550346895dd94ac0/html5/thumbnails/3.jpg)
Each Grand Total and Subtotal is a separate computation of the measure
at a different level of aggregation
![Page 4: Grand Totals and Subtotals: How They Work, How to Make Them Work for You](https://reader036.fdocuments.in/reader036/viewer/2022062305/5681660d550346895dd94ac0/html5/thumbnails/4.jpg)
![Page 5: Grand Totals and Subtotals: How They Work, How to Make Them Work for You](https://reader036.fdocuments.in/reader036/viewer/2022062305/5681660d550346895dd94ac0/html5/thumbnails/5.jpg)
TOTAL (and Grand Totals and Subtotals)perform a separate computation of the measure
at a different level of aggregation
WINDOW_ and RUNNING_ functionsaggregate the original aggregation
![Page 6: Grand Totals and Subtotals: How They Work, How to Make Them Work for You](https://reader036.fdocuments.in/reader036/viewer/2022062305/5681660d550346895dd94ac0/html5/thumbnails/6.jpg)
Measure Aggregations
Regular Aggregate TOTAL
WINDOW_ or RUNNING_
Detail Rows/Columns
The aggregate The aggregate at a different level of detail
Aggregate of the aggregate
Grand Total or Subtotal
The aggregate at a decreasing level of detail
The aggregate at a different & decreasing level of detail
Aggregate of the aggregate at a decreasing level of detail
![Page 7: Grand Totals and Subtotals: How They Work, How to Make Them Work for You](https://reader036.fdocuments.in/reader036/viewer/2022062305/5681660d550346895dd94ac0/html5/thumbnails/7.jpg)
Measure Aggregations
Regular Aggregate TOTAL
WINDOW_ or RUNNING_
Detail Rows/Columns
The aggregate The aggregate at a different level of detail
Aggregate of the aggregate
Grand Total or Subtotal
The aggregate at a decreasing level of detail
The aggregate at a different & decreasing level of detail
Aggregate of the aggregate at a decreasing level of detail
![Page 8: Grand Totals and Subtotals: How They Work, How to Make Them Work for You](https://reader036.fdocuments.in/reader036/viewer/2022062305/5681660d550346895dd94ac0/html5/thumbnails/8.jpg)
Within the Grand Total computation, the Grand Totals effectively removes all discrete dimension
pills from the Rows (for Column Subtotals) or Columns Shelves
Each Subtotal effectively removes all discrete dimension pills to the right of the subtotal’ed pill
from the Rows (for Column Subtotals) or Columns Shelves
![Page 9: Grand Totals and Subtotals: How They Work, How to Make Them Work for You](https://reader036.fdocuments.in/reader036/viewer/2022062305/5681660d550346895dd94ac0/html5/thumbnails/9.jpg)
Giving you the fish: Techniques for Customizing Grand Totals and Subtotals
–Two worksheets and a dashboard–Test for MIN/MAX–Test for TOTAL(COUNTD())– Increasing Level of Detail in the Total
Computations–Custom SQL
![Page 10: Grand Totals and Subtotals: How They Work, How to Make Them Work for You](https://reader036.fdocuments.in/reader036/viewer/2022062305/5681660d550346895dd94ac0/html5/thumbnails/10.jpg)
Two worksheets and a dashboard
Advantages– Don’t have to mess around with custom calcs (much)– Will work with any data source
Disadvantages– Fiddly layout bits – Any filters or parameter-based calculations will need to
be applied to both worksheets.– Any selections in the data worksheet to exclude marks
won’t be reflected on the grand total worksheet.– Can’t deal with expanding/collapsing hierarchies.
![Page 11: Grand Totals and Subtotals: How They Work, How to Make Them Work for You](https://reader036.fdocuments.in/reader036/viewer/2022062305/5681660d550346895dd94ac0/html5/thumbnails/11.jpg)
Test for MIN/MAX
Advantages– Really simple test– Will work with any data source
Disadvantages– Can’t get an aggregate of an aggregate– Fails when there is only one row in the category– Can’t deal with expanding/collapsing hierarchies
![Page 12: Grand Totals and Subtotals: How They Work, How to Make Them Work for You](https://reader036.fdocuments.in/reader036/viewer/2022062305/5681660d550346895dd94ac0/html5/thumbnails/12.jpg)
Test for TOTAL(COUNTD())
Advantages– Can be used when there is only one row in the
CategoryDisadvantages– Requires data source that supports COUNTD()– Doesn’t handle aggregates of aggregates– Can’t deal with expanding/collapsing hierarchies
![Page 13: Grand Totals and Subtotals: How They Work, How to Make Them Work for You](https://reader036.fdocuments.in/reader036/viewer/2022062305/5681660d550346895dd94ac0/html5/thumbnails/13.jpg)
![Page 14: Grand Totals and Subtotals: How They Work, How to Make Them Work for You](https://reader036.fdocuments.in/reader036/viewer/2022062305/5681660d550346895dd94ac0/html5/thumbnails/14.jpg)
Increasing Level of Detail in the Total Computations
Advantages– Supports aggregates of aggregates
Disadvantages– Every measure displayed needs to be altered– Can’t deal with expanding/collapsing hierarchies– Can’t have custom sub-aggregations like the
MIN/MAX technique– In v8, need to control mark stacking
![Page 15: Grand Totals and Subtotals: How They Work, How to Make Them Work for You](https://reader036.fdocuments.in/reader036/viewer/2022062305/5681660d550346895dd94ac0/html5/thumbnails/15.jpg)
Custom SQL
Advantages– Most flexible– Allows for totals to be on top or left
Disadvantages– Potentially doubling data– Not the same formatting options– Every measure & dimension has to evaluated and
potentially custom fields created
![Page 16: Grand Totals and Subtotals: How They Work, How to Make Them Work for You](https://reader036.fdocuments.in/reader036/viewer/2022062305/5681660d550346895dd94ac0/html5/thumbnails/16.jpg)
Teaching you to fish:–How Tableau computes grand totals and
subtotals– TOTAL vs. WINDOW_ and RUNNING_ table
calcs
Giving you the fish:–How to customize your own grand total–How v8 is different
![Page 17: Grand Totals and Subtotals: How They Work, How to Make Them Work for You](https://reader036.fdocuments.in/reader036/viewer/2022062305/5681660d550346895dd94ac0/html5/thumbnails/17.jpg)
Advanced Topic #1 – Hide
• We can hide rows and still have the subtotal row show up, but can’t use table calc filter
![Page 18: Grand Totals and Subtotals: How They Work, How to Make Them Work for You](https://reader036.fdocuments.in/reader036/viewer/2022062305/5681660d550346895dd94ac0/html5/thumbnails/18.jpg)
Advanced Topic #2 - Annotations
• Annotating Subtotals– http://public.tableausoftware.com/views/
annotatingsubtotals/Option5-AnnotatingSubtotals• Annotating Views with Totals– http://public.tableausoftware.com/views/
annotatingaviewwithtotal/1_labelmaxmark
![Page 19: Grand Totals and Subtotals: How They Work, How to Make Them Work for You](https://reader036.fdocuments.in/reader036/viewer/2022062305/5681660d550346895dd94ac0/html5/thumbnails/19.jpg)
TBD Advanced Topic #3 – Custom Grand Totals and Subtotals of Table Calcs
• Aggregates (grand totals and subtotals) of aggregates (table calcs) of aggregates– need to combine tests for row with the increasing
level of detail
![Page 20: Grand Totals and Subtotals: How They Work, How to Make Them Work for You](https://reader036.fdocuments.in/reader036/viewer/2022062305/5681660d550346895dd94ac0/html5/thumbnails/20.jpg)
Vote to Make Our Lives Easier
http://community.tableausoftware.com/ideas/1232Totals and Subtotals based on aggregate of what is
displayed