How to use the Fixed LOD tool in Tableau Prep

A Fixed LOD (Level of Detail) calculation in brief is a way of displaying a data field aggregated to a different level of granularity to the data shown in the view.

In this example we have a slice of the Sample Superstore set where we have two dimension/attribute fields: State & City and one measure field: Sum of Sales.

The granularity of this data in the view is at the city level, where each row represents the sum of sales within that city. If we wanted to see the sales at a state level we could aggregate the data by state but we would then lose the city level granularity. In order to maintain the city level granularity whilst also bringing into view the state level granularity we need to use a fixed LOD.

To open the Fixed LOD tool, click on the three dots on the top right of the field that you would like to aggregate and select the Fixed LOD tool from the calculated field drop down:

From the group by drop down, select the field with the granularity that you want to aggregate by, in this case State and then pick your aggregation type from the drop down in the Compute Using section, in this case SUM.

Press “Done” on the tool and your new field is ready! Your data now still has a City level granularity but you now have a field that shows the sales for whichever state is associated with that row.

This could be used in further calculated fields for example, if you wanted to calculate the percentage of sales that each city represents within their state.

I hope this blog was useful and you enjoy using Fixed LOD calcs in your future prep flows!

Author:
Ross Killington
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2024 The Information Lab