LOD Calculations in Tableau Prep

by Patrick Maguire

LOD Expressions allow us to control the granularity of calculations by fixing the Level of Detail for specific dimensions.

Whilst many are familiar with the extensive use cases these calculations bring in Tableau Desktop, the value they can bring within Tableau Prep is less explored.

LOD Calculations enable us to append data within Prep. The term append refers to the addition of a data field on  to an existing data set. LOD's allow us to add a field that contains a constant, rather than a traditional row to row relationship that is found within joins.

Let's have a look at an example of when we might want to implement an LOD into our Data Prep.

Consider the following output, taken from a Preppin' Data Challenge:

We have Bike Sales across 3 different bike types: Mountain, Gravel, and Road. LOD calculations can allow us to append the total Order Value per each Bike Type to our table. We can do this using the following calculation:

The result of this calculation is that we have a new column within our data showing the total Order Value for each Bike Type, as shown below.

The benefit of LOD Calculations like these is that they allow us to add a field that contains a constant, and doesn't require a traditional row-to-row relationship.