grand totals and subtotals: how they work, how to make them work for you

20
Grand Totals and Subtotals: How They Work, How to Make Them Work for You Jonathan Drummey Quality Management Data Analyst Southern Maine Medical Center [email protected]

Upload: gino

Post on 24-Feb-2016

69 views

Category:

Documents


0 download

DESCRIPTION

Grand Totals and Subtotals: How They Work, How to Make Them Work for You. Jonathan Drummey Quality Management Data Analyst Southern Maine Medical Center j [email protected]. Teaching you to fish: How Tableau computes grand totals and subtotals - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Grand Totals and Subtotals: How They Work,  How to Make Them Work for You

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

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

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
Page 5: Grand Totals and Subtotals: How They Work,  How to Make Them Work for You

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

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

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

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

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

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

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

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
Page 14: Grand Totals and Subtotals: How They Work,  How to Make Them Work for You

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

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

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

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

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

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

Vote to Make Our Lives Easier

http://community.tableausoftware.com/ideas/1232Totals and Subtotals based on aggregate of what is

displayed