How to sort multiple sheets using different measures in Tableau – Skill Pill Video

Sort sheets using multiple measures in Tableau btProvider Partner

What do we use when we want to add interactivity and more control for the end user in our Tableau views? Of course, there are several correct answers here, but the first thing we have in mind, and perhaps one of the most common, is „parameters”. There are countless ways to use parameters in Tableau, but that is not the purpose of today’s post. In the following lines we will discuss about how to sort multiple sheets using different measures.

In today’s post we will create an example of analysis in Tableau, which at first glance may seem very simple and without much information to offer. Lucky us, Tableau users, is that parameters in Tableau give end users the opportunity to identify answers that they do not expect either. Regardless of the analysis or graph we create and how we chose to use parameters, they reveal information that would not normally be identifiable in a data set.

How to sort multiple sheets using different measures

In today’s post, we chose to create a simple table, which exposes some dimensions from our data set, in our case, categories and sub-categories. Next, we want to sort these subcategories considering different measures, such as: sales, profit or quantity. Their sorting will of course be done, using a rank or a top, depending on the value of each measure. For even more control for the end user, we choose to add an additional parameter that will allow him to select the order in which he wants to display the values of the measures, respectively ascending or descending.

Sorting multiple sheets using different measures may seem simple, but at the same time complex. It all depends on how we want to build the visualization and the features we use. In this case, the best way to sort different measures is to use parameters and a single calculated field. The final view gives us the opportunity to select how we want to sort or classify certain dimensions, depending on the measures or values that interest us and that are significant to us.

Next, the video below will show you how you can sort different measures in Tableau using some parameters and a calculated field. Also, every step you must go through is mentioned below.

Step 1: Connect to data

→ In Tableau Desktop, connect to Tableau: Sample Superstore

Step 2: Create the visualization

→ Create a Parameter: Sort by
Data type: String

→ Create a Calculated field: Measure
CASE [Measure]
WHEN ‘Sales’ THEN sum([Sales])
WHEN ‘Qty’ THEN sum([Quantity])
WHEN ‘Profit’ then sum([Profit])

→ Create a Parameter: Sort
Data type: String

→ Create a Calculated field: Rank
RANK(Measure, [Sort]

→ Drag Category on Rows

→ Drag Sub-Category on Rows

→ Drag Rank pe Rows and select discrete, Compute using: Sub-Category

By Eduard Arhire