From the course: Tableau: Mastering Calculations

Unlock the full course today

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

INCLUDE LOD calculations

INCLUDE LOD calculations

In the last video, you saw how you can calculate at a higher, less detailed level than the visualization level of your view. With INCLUDE, we achieve exactly the opposite. You perform your calculation at a more granular level than used in the view. Using the INCLUDE keyword, we can name dimensions that will be included in the aggregation, in addition to the dimensions that already exist in the view. Let's take a look at an example in Tableau. Here, we see the total price per customer. However, we are not only interested in the total price per customer, but also the average shopping cart value. So how much money does each customer spend with an average order that they place with us? In addition to the customer ID, we would also like to include the order ID in the aggregation. Let's create a calculated field and call it shopping cart value. We write INCLUDE and Tableau automatically adds the opening curly bracket. As a dimension, we call order ID, so that Tableau calculates on the…

Contents