Sort Data in Tableau
In this article, we will discuss about sorting and different methods how to sort data in tableau briefly with examples.
In this article, we will discuss how to Sort Data in Tableau.
Before deep-diving into the sorting in tableau and how to sort the data, we will first understand what is sorting and its importance.
What is Sorting?
Sorting is the process of arranging data in a meaningful order to analyze the data easily. It can be done on both categorical and numerical data.
In categorical data, we can arrange the data either in A-Z or Z-A and the numerical data can be arranged either in ascending or descending order.
Example: We have a record of sales of a product by different sales executives in a company.
Sales Executive | Sales (in lacs) |
Z | 10 |
N | 24.6 |
A | 23 |
K | 66 |
B | 45 |
U | 90 |
F | 15 |
K | 25 |
L | 30 |
In the above table, the name of the sales executive can be arranged from A-Z or Z-A and the sales can be arranged from maximum to minimum or minimum to maximum.
To know more about Tableau, Click Here.
In this article, we will discuss one of the important concepts...read more
Best-suited Tableau courses for you
Learn Tableau with these high-rated online courses
Sorting in Tableau
As Tableau is a Data Visualization tool, it allows the sorting of data for easy and quick analysis. Tableau provides different methods to sort the data like data can be sorted from the axis, header, or field label with just a click.
In addition to these, sorting options includes sorting manually in headers and legends, toolbar sort icon or from the sort menu.
Note: Sorting in Tableau is not just limited to the fields (dimensions and Measures) visible on the chart- any field in the data source can be used for sorting.
In Tableau, Sorting can be done in two ways:
- Quick Sort
- from an axis,
- field label, or
- header
- Authoring Environment
- From the toolbar,
- By drag-drop
Quick Sort
Sorting in the tableau can be done with a single click sort button
- One-Click: Sort Ascending
- Two-Click: Sort Descending
- Three-Clicks: Clear the sort
Sorting from an axis
This type of Sorting is done when we have to check any single feature at a time out of all the features given on-axis.
Example: Find the profit in the West Region in all the years.
Step to Sort
- Move over the axis to bring the Sort icon (as mentioned below)
- Click on the Sort Icon
In the above figure,
- First image: No Sorting
- Second Image: Sorted Descending by the sum of profit within Order Date(year) broken by the west region
- Third Image: Sorted Ascending by the sum of profit within Order Date(year) broken by the west region
Sorting from Field Label
This type of sorting is done, when we have to check the record (performance) of all the items of any field at a time.
This type of sorting helps while comparing the data.
Example: Find the profit in each region and sort the region in alphabetical order.
Step to Sort
- Move over the field label to bring the sort icon
- Click on the Sort icon
In the above figure,
- First image: Regions are sorted descending (Z β A)
- Second image: Regions are sorted ascending (A β Z)
In Field Label, we have more options for sorting the data other than the default (A-Z and Z-A)
Sort from Header
This type of sorting is done when we have to sort a field based on the values of different fields.
Example: Sort the category based on the profit of the Sub-category Art.
Step to Sort
- Move over the header to bring the sort icon
- Click on the Sort icon
In the above figure, sort is applied to the Category (Sorting the order of columns- Office Supplies, Technology, and Furniture) based on the profit of Art since the header is used for the sort.
Sort options while authoring
Sort from Toolbar
This is the most simplified way of sorting, that can be used very frequently in any condition.
Example: Sort the Category in descending order of Profit.
Step to Sort
- Select the field (on the basis of which you want to sort)
- Select the button (ascending or descending) from the toolbar
In the above figure, Category wise profit is arranged in descending order.
Sort by Drag and Drop
This type of sorting is done manually, select the header in the legend and drag it to the required position ( a black line will appear that appear where it will go).
Additional Resource
We can do sorting in the tableau by just simple right-click on the required field and then select the sort i.e.
- Right-click on Field β > Select Sort
- Window will appear
- Select the option from the drop-down in Sort By
- Window will appear
Click Here: To know more about Top Tableau Online Course & Certification.
Conclusion
In this article, we have discussed how to sort the data in tableau.
Hope this article will help you in your data/business analyst journey.
This article is a part of a complete tutorial on Tableau, focusing on Tableau certified data analysts and tableau desktop specialists.
Through a series of articles, we will cover all the topics in-depth with examples.
Top Trending Articles:
Data Analyst Interview Questions | Data Science Interview Questions | Machine Learning Applications | Big Data vs Machine Learning | Data Scientist vs Data Analyst | How to Become a Data Analyst | Data Science vs. Big Data vs. Data Analytics | What is Data Science | What is a Data Scientist | What is Data Analyst
Vikram has a Postgraduate degree in Applied Mathematics, with a keen interest in Data Science and Machine Learning. He has experience of 2+ years in content creation in Mathematics, Statistics, Data Science, and Mac... Read Full Bio