Sort Data in Tableau

Sort Data in Tableau

4 mins read815 Views Comment
Vikram
Vikram Singh
Assistant Manager - Content
Updated on May 13, 2022 10:15 IST

In this article, we will discuss about sorting and different methods how to sort data in tableau briefly with examples.

2022_05_feature-images_sorting-in-tableau.jpg

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.

2022_05_sorting-the-data.jpg

To know more about Tableau, Click Here.

Dimension and Measure in Tableau
Connecting data in Tableau
Create Table, line chart and Scatter Plot using Tableau Show Me
Recommended online courses

Best-suited Tableau courses for you

Learn Tableau with these high-rated online courses

β‚Ή39.54 K
2 hours
– / –
45 hours
– / –
4 weeks
– / –
4 weeks
β‚Ή2.25 K
4 weeks
Free
12 hours
– / –
1 hours
β‚Ή19.89 K
16 hours
– / –
3 hours
β‚Ή19.7 K
6 months

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
2022_05_Sorting-from-an-axis.jpg

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
2022_05_sorting-from-field-label.jpg

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)

2022_05_other-sorting-from-field-label.jpg

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
2022_05_sort-from-header.jpg

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.

Tableau Operators: Arithmetic, Comparison and Logical
Union in Tableau: Create, Rename and Remove
Different Types of Filters in Tableau

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
2022_05_sorting-from-toolbar.jpg

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).

2022_05_sort-by-drag-and-drop.jpg

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
2022_05_additional-resource.jpg

Click Here: To know more about Top Tableau Online Course & Certification.

How to Create Context Filter in Tableau
Types of Charts in Tableau
Number Functions in Tableau: Mathematical, Trigonometric

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

About the Author
author-image
Vikram Singh
Assistant Manager - Content

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