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.

The Data School
Author: The Data School