How to Apply Quick Table Calculation in Tableau

While working on Tableau reports and charts, I often need to calculate percentages or running totals. We can perform these advanced calculations without creating a calculated field.

In Tableau, there is a built-in Quick table calculation that allows us to perform advanced calculations like Running Total, Percent of Total, and Rank with clicks.

In this tutorial, I will explain what Quick Table Calculations are in Tableau and how to apply them in Tableau worksheets.

Quick Table Calculation in Tableau

In Tableau, Quick Table Calculations are pre-built calculations that allow us to implement calculations for the measures that we have used in the Tableau charts and tables. Instead of manually creating formulas, we can right-click on a measure and apply built-in options such as:

  • Running Total
  • Percent of Total
  • Difference
  • Percent Difference
  • Rank
  • Moving Average
  • Percentile
  • Year-over-Year Growth

Apply Quick Table Calculation in Tableau

In the examples below, we will see the method to apply the built-in quick table calculation for different scenarios using the Tableau Superstore dataset.

Example-1: Showing Percent of Total Sales by Region

In this example, we will show the sales total in percentage for the regions in the Superstore dataset.

To create the view, drag the Region to Rows and Sales to Columns.

Create a Quick table calculation in Tableau

To see the percentage of the total, add Sales to the Label cards in the Marks section. Then, click on the sales label and select Quick Table Calculation -> Percent of Total.

Percent of total in Tableau

Now, on the bar labels, we can see the percentage contribution of each region to the total sales.

Percentage of total sales in Tableau

This way, we can use the quick table calculation in Tableau to show the percentage of the total.

Example-2: Creating a Running Total of Sales Over Months

In this example, we will display the running total of sales using the Quick table calculation. With this calculation, we can analyze the sales of months over the years.

To create the view, add the Order date to the Columns and set the date format to Months.

Apply Sum of running total in Tableau

Now, drag the Sales to Rows, then click on the Sales dropdown and select Quick Table Calculation -> Running Total.

Running total calculation in Tableau

With this, the line chart will show the sum of sales month by month throughout the year.

To show the sales values in the running total, press “Ctrl” and drag the Sales from Rows to the Label card in the Marks section.

Show Running total in Tableau quick field calculation

Now, we can see the sales are adding up month by month to show the running total of each month.

Using this table calculation, we can track progress for measures like sales and profit over a period of time.

Example-3: Calculating the Rank of Products By Profit

In this quick table calculation, we will display the products in order of ranking according to their profit.

To visualize this data, we will create a text table. Now, drag the Product Names to Rows.

After this, add the Measure Names to Columns and Measure Values to the Text card. Then, in the Measure Values, only keep the measures ‘Sales‘ and ‘Profit‘.

Use quick table calculation to show Rank in Tableau

To show the Product by profit rank, go to Measure Values and select Profit -> Quick Table Calculation -> Rank.

Calculate Rank by measure in Tableau

In the Profit Rank column, click on the sort button to sort the product in ascending order by the profit rank.

Use Rank in Tableau quick Table calculation

Now, we can see the Product Name and their sales ranked in order of profit.

This way, we can use the Rank in the Tableau quick table calculation to sort the measures in order of ranking.

Example-4: Year-over-Year Growth of Sales

In this example, we will use the quick table calculation to show the growth and change in sales compared to the previous year.

To visualize the data, add the Order Date to the Columns in the year format. After this, add the Sales measure to the Rows.

Quick Table calculation for year over year growth in Tableau

To add a quick table calculation, click on the Sales in the Rows and select Quick table calculation -> Year over Year Growth.

Create a Tableau quick table calculation

After this, add the quick table calculation of Sales to the Label card in the Marks section.

Tableau year over year quick table calculation

With this, we can see the year-over-year sales percentage change compared to the previous year.

This way, we can use the year-over-year quick table calculation in Tableau.

Conclusion

In this Tableau tutorial, we have learned how Quick Table Calculations in Tableau can be used to perform advanced analysis without writing custom formulas. We learned how to apply built-in calculations like Percent of Total, Running Total, Rank, and Year-over-Year Growth directly to measures in our reports.

With just a few clicks, we created a chart and a table to show percentage contributions, tracking progress over time, ranking products, and comparing yearly performance.

You may also like to read:


Agentforce in Salesforce

DOWNLOAD FREE AGENTFORCE EBOOK

Start with AgentForce in Salesforce. Create your first agent and deploy to your Salesforce Org.

Salesforce flows complete guide

FREE SALESFORCE FLOW EBOOK

Learn how to work with flows in Salesforce with 5 different real time examples.