Table calculation and LOD

This week I will show you two methods to create a visualization using Table Calculation and Level of Detail. Let’s create the following visualization together. The goal is to show the highest profit subcategory as per each state. The states are colored with the subcategories in the legend.

Table Calculation:

Using the familiar dataset Superstore Sales, then I create a map card and drag State into Details, and Subcategory into Color.

Next, I am going to create the rank based on sum of sales using quick table calculation.

Configure the Table calculation like following:

Lastly, drag the Sales Rank into the filter card then type 1 in two fields of the range.

Level of Detail:

First you have to create a calculated field for the highest Sub-Category sales per state using the fixed LOD.

After that I will create another calculated field to return the sub-category having the highest sales for each state.

Lastly, just drag the Highest sub-category as dimension into the filter card. Click control and drop Highest Sub-Category onto color as well to have the final viz:

Above example illustrates using Table Calculation and Level of Detail to achieve the same result.

Author:
Tram Nguyen
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
© 2025 The Information Lab