Hi, @Amenda,
You have to follow a few steps which are given below:
Step 1: Set up the Visualization
-
Open Tableau Desktop and connect to the Sample-Superstore saved data source.
-
Navigate to a new worksheet.
-
From the Data pane, under Dimensions, drag Region to the Columns Shelf.
-
From the Data pane, under Measures, drag Sales to the Rows Shelf.
A bar chart showing the sum of sales for each region appears.
Step 2: Create the LOD expression
Instead of the sum of all sales per region, perhaps you want to also see the average sales per customer for each region. You can use a LOD expression to do this.
-
Select Analysis > Create Calculated Field.
-
In the Calculation editor that opens, do the following:
-
Name the calculation, Sales Per Customer.
-
Enter the following LOD expression:
{ INCLUDE [Customer Name] : SUM([Sales]) }
-
When finished, click OK.