To aggregate or not to aggregate fields?

The main rule with Calculated Field is to think about aggregation when you create a new Measure. As you know, a Measure is, by default, aggregated and so are Calculated Measures. You can specify the aggregation inside the formula or not. If you aggregate the data inside the formula, the pill of the Calculated Measure will start with AGG. If you don't specify the aggregation in the formula, a default one is added when you use the Calculated Measure, as for any normal Measure.

For example, the Calculated Measure Profit Ratio, in the Sample - Superstore Data Source, contains the aggregations inside the formula, so its pill starts with AGG displayed as follows:

A Calculated Field cannot contain aggregated ...

Get Getting Started with Tableau 2018.x now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.