Calculate Percentage of Total in Tableau

This article shows how to calculate the percentage of the total in Tableau tables, bar charts, pie charts, matrices, etc. The percentage of the total helps to identify which country or segment has the highest sales percentage.

For this Tableau percentage of the total calculation demo, we used DimCustomer, DimGeography, DimProduct, and FactInternetSales from the AdventureWorksDW 2019.

Choose Tables

Calculate Percentage of Total in Tableau Table

Add English Country Region Name to the Rows Shelf and Sales Amount to the Labels to generate this Tableau Table. So, refer to the Create Table article.

Table Report

Video

Within the Marks Shelf, click on the Sum of Sales and choose Quick Table Calculation -> Percentage of Total.

Calculate Percentage of Total in Tableau Table Report

Now, you can see the Sales in Percentages instead of numbers.

Table with Percentages

Bar Chart Example

Drag English Country Region Name to Columns Shelf and Sales Amount to Rows Shelf. Next, add Country to Color and Sales to Labels to generate this Bar Chart.

Bar Chart

Within the Tableau Marks Shelf, click on the Sum of Sales -> Quick Table Calculation -> Percentage of Total.

Calculate Percentage of Total in Tableau Bar Chart

Add Sales to Label shelf.

Add Sales Values. to Labels

As you can see, it shows both the percentage of the total and the actual sales amount.

Bar Chart with percentage of the total and the actual sales amount

Calculate Percentage of Total in Tableau Pie Chart Example

First, change the marks type to Pie. Next, Drag English Country Region Name to Color and Sales Amount to the Angle, Size, and label Shelf. It generates this Pie Chart.

Within the Marks Shelf, click on the Sum of Sales (Label) -> Quick Table Calculation -> Percentage of Total.

Pie Chart

Now, you can see the Pie Chart where each Pie shows the percentage of the total.

Calculate Percentage of Total in Tableau Pie Chart

Calculate Percentage of Total in Tableau Matrix or Crosstab

Drag Order Date Year to Columns Shelf, Quater, and Month to Rows Shelf to generate crosstab. Next, add the order date year to Color and Sales to Label.

To convert the sales amount to a percentage of the total, Within the Marks Shelf, click on the Sum of Sales -> Add Table Calculation or Quick Table Calculation -> Percentage of Total.

Matrix or Crosstab

Change the CalculationType from Difference from to Percentage of Total.

Calculate Percentage of Total in Tableau Matrix or Crosstab

By default, Tableau Desktop computes the percentage of the total Table across. So, please change it to Table down option.

Table Down

Close the calculation window and add the sales amount to the matrix.

Add Sales Value to the Matrix

Compute using Table

Compute Percentage Of Total using Table

Compute the Tableau Percentage Of the Total using Pane down.

Compute Percentage Of Total using Pane Down

You can choose the Specific Dimension, select the required columns, and change the At the level from deepest to required.

Compute Percentage Of Total using Specific Dimension in Tableau