From the course: Tableau: Mastering Calculations

Unlock the full course today

Join today to access over 24,200 courses taught by industry experts.

Sum and average

Sum and average

The most common types of aggregation are sum and average. For example, here we are looking at the sum of total price per SKU, as indicated by the sum in the green pill. You can also specify this directly in the calculation. Let's call it Sum of Sales. Our function will be SUM and we use this to sum up our total price. Now if we use this field in the view, this will sum up all the rows used in the view, depending on the level of detail in the view, that is, the combination of all values of all dimensions. In our case, that is only SKU. An important note here is that empty values are skipped, so as soon as at least one row contains a value, we get a sum. Tableau will only show us null if all rows contain null. When using this field, Tableau uses AGG in the green pill. AGG stands for aggregated. This abbreviation tells us that the aggregation happens already in the calculation, and can no longer be changed in the view afterwards. This calculation is different with the sum of total price.…

Contents