MIP Logo

INCLUDE: Using Level OF Detail (LOD) Expressions in Tableau

An Include LOD

This post was originally published on The Data School blog between 2018 and July 2025, before our program was renamed to MIP’s Analytics Career Accelerator. References throughout this article to “The Data School” or “DS” all refer to what is now MIP’s Analytics Career Accelerator. The program, its people, and its commitment to launching outstanding analytics careers remain the same – just under a new name.

If you are having trouble viewing this article, please report it here

Today’s blog will cover the INCLUDE Level of Detail expression and function.

The INCLUDE function basically changes the level of detail similar to the FIXED and EXCLUDE do by including the specified dimension into your view along with those dimensions already in the view in pill form.

If we wanted to find the poorest-performing city within a region. So, we have 2 levels of detail country/region and city.

To use I INCLUDE to achieve this we need to find the least sales of each city and then the average of these for each country/region.

AVG({INCLUDE [City]: MIN(Sales)})

Putting our newly created ‘Least Sales per City (AVG)’ measure into our view, these are our values. Remember to start in a crosstab to double-check things look correct before building the vis.

We can see that in office supplies Canada has higher average sales than the U.S but also has the lower performing city on average. Once again two different levels of detail on the same worksheet.

Share this post