Fixed LODs in Tableau Prep

Fixed LODs are new in Tableau Prep Builder 2023.3, and if you are used to Tableau Desktop, you may be familiar with what a fixed LOD is. However, as there is no specific table or chart "view" in Prep, just the original data table, they work slightly differently. In tableau prep, Fixed LODs work very similar to aggregation, in that you are able to find sums, averages, maximums, etc. across either the whole table, or within groups of data.

For an introductory example in this blog, I will be using the classic "sample superstore" dataset, to find whether or not the sale amount of each order was above or below the average?

Example steps

I will first open up the sample superstore dataset in Tableau, and drag the 'orders' column onto the canvas.

From here, add a clean step after the initial input. This is where we will calculate the Fixed LOD.

Next, we want to create a fixed LOD, which finds the average sale price per sub-category. This can be done by first clicking the three dots next to sales in the data profiling view.

Navigate down to "Create calculated field" and select "FIXED LOD"

As we want to find the average sale price per sub-category, change the drop down under "Group by" to "Sub-Category", "Compute using" to "AVG" (short for average), and the final drop-down should be automatically set to "Sales"

Before clicking done in the top right of the FIXED LOD pane, remember to rename your new column to something useful. In this instance, I have used "Average sales per sub-category".

To now find whether or not the sales of each individual order is greater than or less than the average, we need to next create a new clean step and add create a calculated field within this.

From here, all we need to do is create a boolean statement that compares the sales of the current column to the average sales per sub-category, that we just worked out using our FIXED LOD.

Click done, and you should now have a new column which contains true with the sales of that row is greater than the average, or false if it is less.

Author:
Thomas Smith
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