Quick Tips: How to Sort Alphabetically and Filter by Range of Numbers
Note: As part of #TableauTipsMonth, the students of The Information Lab’s Data School are sharing their favorite Tableau tips.
Nai Louza: ABC Do Nothing with Me! – Alphabetical Sorts in Tableau
For the longest time, parameters were an absolute pain for me to figure out. My brain just couldn’t wrap itself around the idea of first having to create the parameter function and then a calculated field to tell that function how to, well, function.
But once I got confident with parameters, I realized you could use them for anything to give you ultimate interactivity. One of my favourite ways to include parameters in my dashboard is to give the user options for how to sort the data presented. But what if you want to sort your alphabetically?
First things first: 1. Create the parameter and enter your sort values.
And 2. Create a calculated field with a case statement to tell the parameter how to run.
However, you will notice that I didn’t include a case statement for my alphabetical option. If you want things to sort alphabetically in Tableau, you essentially have to….do absolutely nothing.
Tableau defaults to sort alphabetically so if it isn’t given explicit instructions for how to sort in the parameter calculation, it will default to alphabetical. And that is the simplest way you can give users the option to sort information alphabetically.
Rob Suddaby: Filter by Range of Numbers
When you filter by a range of numbers, it can be difficult to adjust the range to specific values on the quick-filter card. As you may already know, you can actually edit the ranges directly by clicking on a number in the quick filter card and simply typing over it. However, if you’re working with really large numbers, it can be a real pain to quickly work out how many zeros you need to add to the end to get the desired result.
Excel junkies may be used to the trick of exploiting exponential notation to automatically generate zeros; that is, inputting 1e3 for 1,000 or 1e6 for 1,000,000. Someone at Tableau clearly had those of us who rely on this shortcut in mind because, lo and behold, if you type 1e3 into the filter card, it automatically converts it to 1,000!
Got a Tableau tip to share? Post them in the comments below or via Twitter using the hashtag #TableauTipsMonth!
Subscribe to our blog
Get the latest Tableau updates in your inbox.