top of page

Custom Sort Column Methods

Updated: Jul 2, 2023

If you are new to Tableau, you may not be aware that there is a sort button on the top of each column if you are displaying your field labels. With this button you can sort the data in your column by descending or ascending order. However, if you hide your field labels, this button goes away.


In my research I found a couple of different methods to add sort actions back to your dashboard.


In this Evolytics article link titled Custom Sorting with Parameters in Tableau, Jay Farias reviews how to set up custom sorts with the help of two Parameters and one calculated field. The way the dashboard is set up in this article is to display the two Parameters as drop-down options.



In this second article titled How to Make Custom Sorting Headers in Tableau (link) from phData by Autumn Battani; she reviews a method with the help of a creating an excel sheet for arrows. This sheet is used for the header visualization. She also used Parameters and Parameter actions for her dashboard. There is also a YouTube video in this site, where she walks you through how to create the dashboard and it has some very neat time saving tricks!


I recreated her dashboard using the Sample Superstore dataset here. I created a column in the first row for Sub-Category using the min(0.0) calculation. I also made this a Gantt chart to display an orange line next to the text when the sort is selected on this column.


I added calculations for each column to display the label and change the color of the bars to orange when the sort is selected for the dimension columns.


There is also a navigation link to a second dashboard where I used the methods from Jay Farias's article. In the second dashboard I do not have the drop-down parameters that are displayed in the Evolytics article.


I went a step further and created a Header using an aggregated bar chart for each column.

I adjusted the axis for each to cut out the excess white space.

I then created a separate sheet to display arrows for ascending and descending options.

I applied the Parameter Action on this sheet. I also used a trick to create a bar around the Sub-Category text. I get this question a lot on how to change the text of a field to color it. I thought if I added a gradient, it would be easier to see how the Sub-Category is sorting. I don't think this is a good practice. Too many colors can overwhelm your end users.


I have other tricks in this dashboard such as changing the header column to a color when it's selected.

Feel free to download this dashboard to see how its configured.

257 views0 comments

Comments


bottom of page