How to calculate Percent of Total in Viz in Tooltip for a category, in Tableau Software? – Skill Pill Video

Percent of Total in Tableau Software

Tableau Software is one of the most powerful tools when it comes to visualizing and understanding our data. Exploring and analyzing data gives us valuable information about our company, such as profit or sales evolution, marketing campaigns results or costs distribution. In general, data analysis provided by Tableau Software gives us all the information we need to make the right strategic decisions for our company.

Tableau Software also offers a wide variety of data analysis types that can be built to answer all the questions we have about our organization. No matter what we want to know or to find out, exploring and understanding our data is the key to making the best decisions about future actions within the company.

Percent of Total

One of the most useful visualization in Tableau when it comes to exploring sales data, is the percent of total for a subcategory. With this analysis, users visualize in one place more information about a specific category or subcategory. Thus, they can analyze the distribution percent of a measure, considering certain dimensions.

Percent of total in Tableau is an analysis that displays the percent of the measures, such as sales, and less numerical values. This type of visualization highlights and determines the user to understand much more easily the trend and the evolution of the marketed product categories. It can easily analyze whether the value of the products sold was evenly distributed in the product subcategories or whether some of them contributed more or less to the whole amount. Therefore, percent of total analysis highlights the contribution of each subcategory to the total value of sales received.

Next, we will show you how to create a percent of total visualization and how to analyze sales value for several products subcategories.

Step 1: Connect to data

→ In Tableau Desktop, connect to Superstore sample data provided by Tableau.

Step 2: Create the visualization

→ Right click on Subcategory and select Create -> Set. Name it Subcategory set then click OK.

→ Select the visualization type from the Marks area into Pie. Drag the Sales on Size, on Angle and on Label. Right click on the Sales from the Label and select Quick Table Calculation -> Percent of Total. Drag the Subcategory Set on Color.

→ Create a calculated field named Dummy with the formula: ‘Dummy

→ Create another worksheet.

→ Drag the Subcategory on Columns and the Sales on Rows.

→ Drag the Sales on Label.

→ Go to Worksheet -> Actions -> Add action -> Change Set Values. From the Source sheet select the current sheet, for the Run Action on select Hover, from the Target Set select the Subcategory Set and from the Clearing the selection will select Remove all values from set.

→ Go to Tooltip and insert here the sheet with the Percent of total. Go to Insert and select Sheets.

→ Replace the All fields with the field Dummy, so this sheet will no longer be filtered by subcategory and the set will be activated.

→ Now when you hover over a subcategory you can see what percentage it represents from the total. For example, the Appliances subcategory represents 8% of the total.

By Adelina Popescu

Download Tableau Software