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.
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.
→ In Tableau Desktop, connect to Tableau: Sample Superstore
→ Create a Parameter: Sort by
Data type: String
Sales
Qty
Profit
→ Create a Calculated field: Measure
CASE [Measure]
WHEN ‘Sales’ THEN sum([Sales])
WHEN ‘Qty’ THEN sum([Quantity])
WHEN ‘Profit’ then sum([Profit])
END
→ Create a Parameter: Sort
Data type: String
asc
desc
→ 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
In this Skillpill, you will learn how to use tSendMail in Talend. tSendMail is a component used to send emails directly from a Talend job. It supports various email protocols, such as SMTP, and allows the configuration of the sender, […]
🚀 Enhance Your Tableau Dashboards: How to Swap a Different View Parameter! 📊✨ Tableau is one of the most powerful tools for data visualization and business intelligence. Its user-friendly interface and rich set of features allow you to create interactive […]
In this Skillpill, you will learn how to create a Parliament Chart in Tableau. A Parliament Chart, or semicircular chart, represents the distribution of parliamentary seats. It is not a standard chart type in Tableau but can be manually created […]