How to use Tableau Set Actions to Compare the Top N vs Other

Tableau set actions are the latest(2018.3) type of section in the dashboards which unlocks the recent user experiences. By allowing the user to dynamically control which dimensions parameters we have to include in a data set.

In this post, I will use the set actions to allow my end user to opt the top N. By merely clicking on the dimensions parameters on a chart or a graph.

The Graph –

In this case, we will build a bar chart using the sales measure and the sub-category dimension from the Sample Dataset (here). As soon as we drag these parameters and drop them into their respective fields. We will be able to see a complete bar chart. Eventually, the user will be able to select and highlight a particular set of bars as the Top N. Or we can say the Focus of the dashboard. The remaining dimensions which were not click on, we will group them as one other bar call ‘Other.’ Below is the bar chart:

Before using your set actions, we must have a set. There are specific steps that the user has to follow to impart the user experience.

1) The initial step is to create a complete set out of the Sub-Category dimension. The dimensions parameters earlier chosen will not be taken into consideration. As the user will replace the selections made in the set action.
2) The next step is to place all those selected Sub-Category members in the set. So that we can group each and everything into one single set.

To generate its working, I have to place the recent create Top N Set on the row section.

3) The third step is to create a calculate field (right click on variable –> create Calculated field). It tells Tableau to display the name of the Sub- Category if the dimension member is in the set that we create. We need to group everything remaining into a row call “Other.” Below is the formula that we will be using:

Top N Set vs Other Calculated Field in Tableau

4) The fourth step is to replace the prior sub-category dimension on the row section with the latter created calculated field. When we create the Sub- Category in the set, the names of that Sub- Category will be displayed on the chart. If it is not displayed, then it will be grouped into other bar called “Other.”

Sales by Top N vs Other Bar Chart in Tableau

5) The dimensions we chose to generate the set must be part of the view. Since we have replaced the sub-category dimension, we can go back to that view by placing the prior Sub- Category dimension on the Details Mask card.

Sales by Top N vs Other Bar Chart with Sub Category on Detail in Tableau

6) Now we can create the dashboard and add a set action. First, we will add the worksheets created to the dashboards. Then the following step will be followed

dashboards –> action –> add –> “Change Set Values..” (new feature available in Tableau 2018.3). Below is a set action which we will create.

If I highlight a box around the top five marks to select them, Those marks will replace the selections in the Top N Set that we created.

The calculated field will separate the preferences into two outcomes:
  1. a) when the dimension parameter is in the set, we will see the name of the sub-category.

b) when the dimension parameter is not in the set, it will get grouped into “Other.”

Comparing the Top 5 vs Other in Tableau

Here is my final view looks.

Comparing the Top 10 vs Other in Tableau Final View

This technique has actually improved the focus and helps illustrate the intensity of Top N and diminished the cognitive load on my end- thus helping to make the analysis more effective.

This technique has actually improved the focus and helps illustrate the intensity of Top N and diminished the cognitive load on my end- thus helping to make the analysis more effective.
It was just an insight to explain the usage of Data. If you need to understand the complete picture of the data, and to get to know the complete working of Tableau, enroll yourself for Tableau Training program at PST Analytics, Gurgaon. We have super knowledgeable professional tutors who will train you in the field of Analytics, Data Science, Machine Learning, Artificial Intelligence, and Data Visualization. The trainers themselves are associated in their respective domain and are globally certified.

Good Luck Endeavors!!

Leave a Reply

Your email address will not be published. Required fields are marked *