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 percentage of the total calculation demo, we used DimCustomer, DimGeography, DimProduct, and FactInternetSales from the AdventureWorksDW 2019.

Calculate Percentage of Total in Tableau Table

Add the 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.

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.

Bar Chart Example

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

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

Calculate Percentage of Total on Bar Chart

Please add Sales to the Label shelf to see the percentage of the total and the actual sales. As you can see, it shows both the percentage of the total and the actual sales amount.

Calculate the Percentage of the Total in Tableau Pie Chart Example

First, change the marks type to Pie. Next, drag the 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.

Calculate Percentage of Total on Pie Chart

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

Calculate the Percentage of the 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.

Change the CalculationType from Difference from to Percentage of Total.

Calculate the Percentage of the Total in Matrix or Crosstab

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

Close the calculation window and add the sales amount to the matrix measure values. Next, choose the Compute using Table option from the table calculation.

Compute the Percentage of the Total using Pane down.

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