Learn to create a difference from the summary average

In this new article and skill pill video, we will learn how to create a difference from the summary average using a calculated field. The first step is to create a Set from Sub Category and use the sheet for Sum of Sales and the Sum Category.  

You may be interested in seeing the difference in sales from the year’s average? What is important to remember is that Tableau has 2 big qualities and those are scope and direction. 

Calculating the difference from the summary average helps you to:

→ see the difference in a certain period from a certain year compared to the average on the entire year

→ the profits on Q1 for example, compared to the average in the entire year

→ see the fluctuations of the profit from the previous year

→ see the positioning of a specific quarter compared to the average of the last year

Follow the steps closely and create your own chart:

Step 1: Connect to data

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

Step 2: Create the visualisation

→ Create a calculated Set using Sub- category: Sub-category Set

→ Create a calculated field: Difference

Sum(sales) – Window_avg (sum (if Sub-category Set then Sales end))

→ Drag Sum(sales) on Columns and Sub-category on Rows

→ In another sheet: Drag Difference on Columns and Sub-category on Rows

→ Drag Difference on Color

→ In dashboard: Add action -> Change Set Values and user Sub-category Set

If you need to visualy see how it’s done, here it is the new skill pill video created by Eduard Arhire, Data Analyst at btProvider.