Chapter 4Aggregate Functions, Calculated Fields, and Parameters

In previous chapters, you have seen how easy it is to connect to your data from various data sources and to analyze it visually with just a few mouse clicks. With this knowledge, you are already prepared for 80% of the day‐to‐day use cases of Tableau.

There are, however, also those 20% of use cases that involve more complex questions and that may require the use of some more‐advanced techniques, including changing the type of aggregation, creating new calculated fields, or setting up parameters.

Parameters allow you to define values external to your dataset that might have an effect on your visualization. Examples include the factors that might go into the calculation of a “what‐if” scenario or search strings used to filter a text variable.

By the end of this chapter, you will be able to

  • Understand when to use which type of aggregation
  • Create and edit calculated fields
  • Add interactivity via parameters

AGGREGATE FUNCTIONS

As you saw in the previous chapter, each individual mark in your visualization typically displays the aggregated value of a measure—aggregated across all the underlying rows in the data table associated with that mark. When working with a live connection, this aggregation can often be calculated by the database server, meaning only the aggregated values need to be sent to Tableau. If you are familiar with SQL, you will notice that several of the aggregation functions in Tableau have similar equivalents ...

Get Visual Analytics with Tableau now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.