A few years back, Tableau 9.0 came out, introducing Level of Detail (LOD) Expressions. At the time, it was quite a breakthrough and for me it still is. These LOD expressions let people express powerful concepts using simple statements. LOD’s provide us a way to easily compute aggregations that are not at the level of detail of the visualisation. We can then integrate those produced values within visualisations in different ways. In the 2021.1 version, Tableau introduced a quick way to construct fixed Level of details expressions.

LOD Expressions

LOD expressions are usually made by creating a calculated field and then typing in the desired expression. The purpose of this short post is to show a quick way for creating an LOD, or at least a quick starting point to construct it. If you are not familiar with Level of Details calculations you can check the link to better understand how it actually works and the many uses of such an expression.

Quick LOD Expressions

Quick LOD feature allows us to construct simple LODs in a Tableau drag and drop manner. Currently, the feature constructs a FIXED expression that can be later modified to any of the other LODs available (INCLUDE and EXCLUDE).

With versions 2022.1 onwards, there are 2 extra options to create FIXED LODs.

  1. While pressing Command, click the measure (Control on a Windows machine) you want to aggregate and drag it to the dimension you want to aggregate on. The newly created field will appear as a FIXED LOD calculation measure (e.g. Quantity (Region) will stand for { FIXED [Region]: SUM([Quantity]) } ).
  2. Select the measure you want to aggregate, and then while pressing Command (or Control for Windows), select the dimension you want to aggregate on. Right click one of the selected fields and select Create > Quick LOD. A new measure will be added just like the former option. More than 2 fields selected will not show the option to create a quick LOD.

In both options we can edit the calculated field and modify the expression as we like. Option 2 though, opens up the calculation dialog box so we can edit and modify the expression immediately.

By no means, this is not breaking news, nevertheless, it gives us a quick drag and drop starting point to construct our desired expression.

If you want to learn more about Tableau or The Information Lab, check out our blog.