Tableau - Calculating % Of Total Sales

The task is to find the percentage of total sales by region. There are two ways to do this in Tableau.

Method 1 (LOD Expression):

Step 1: Create a new calculated field in Tableau called "All Sales" and type


                {SUM([Sales])}
                 

Step 2: Create a new calculated field called "% of Total" and type


                 [Sales]/[All Sales]
                 

Step 3: Right click "% of Total" and select Default Properties -> Number Format -> Percentage

Step 4: Drag "Region" to rows and "% of Total" to rows

Step 5: Sort Order Descending and Sort By Field "Sales" with Aggregration as Sum


Method 2 (Quick Table Calc):

Step 1:Drag "Region" and "Sales" to Rows

Step 2:Right click on "Sales" and select Quick Table Calculation -> Percentage of Total

Step 3: Sort Order Descending and Sort By Field "Sales" with Aggregration as Sum


Dash-Intel is a Power BI and Tableau resource site for data visualization and building BI dashboards.

Data Analyst & Consultant

Copyright 2015-2023 Dash-Intel.com Terms