Sorting it out in Tableau

Sorting allows you to have control over dimensions members that are listed in the view. The ways you can sort your data in Tableau can be as follows:

Toolbar Sorting

Toolbar sorting is simple. Just above the columns section where you can put your fields are two options for sorting it immediately into ascending or descending as highlighted in the example figure below.

As a general note, you will know when a dimension has been sorted when it has the bar charts symbol next next to it.

Clearing the Sort

If you would like to clear your sort, it is easy to do so. All you have to do is right click on the dimension, in this case it is category, and click clear sort.

Clearing the sort just sorts the data alphabetically, which is the default or original sort.

Axis Sorting

For axis sorting, you can click the sorting symbol next to the continuous field axis, in this case it is sales. It will sort it into descending first, ascending second and then back to default.

You can even sort it using the dimension field axis. Click the symbol next to the dimension field row label, in this case it is category.

What it does is simply sort your data in alphabetical order, either ascending or descending, of the fields within the dimension.

Ascending Alphabetically (Left), Descending Alphabetically (Right)

Although for analysis purposes, it would be best to go with sorting using the continuous field axis.

Manual Sorting

To manually sort your data, you'll have to right click on categories or your specific dimension field and select sorting –> manual as shown below. Essentially, you can sort or order your field members however you want.

Manual Sorting Steps

Nested Sorting

Now let's say you are examining the sub-categories within the categories. The sub-categories are embedded into categories within the view, so it is 'nested' in categories.

Since it is sub-categories that is being looked at and sorted, right click sub-categories and select –> nested. You can sort it either ascending or descending as shown.

Nested Sorting Steps

This should then leave with the following graphs below.

Ascending (Left), Descending (Right)

You can even just simply use the toolbar or axis as shown previously and below to sort it. However, by doing the nested sorting this way it allows you to sort the data using fields not shown in the view at all. In the final step of the nested sort steps, you could change the field name from sales to profit for example and see how the data is sorted that way.

Author:
Lorenz Nacilla
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2024 The Information Lab