Sort Data in Tableau

# Sort Data in Tableau

4 mins read815 Views Comment
clickHere
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.

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.

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.

Dimension and Measure in Tableau
Tableau supports seven different data types and it tableau automatically assigns a data type and role to each column.
In this article, we will discuss one of the important concepts...read more
Connecting data in Tableau
In this article, we discussed connecting data in tableau, how to connect files and servers to a tableau with steps on how to connect excel files, how to connect MySQL...read more
Create Table, line chart and Scatter Plot using Tableau Show Me
In this article we will discuss Tableau Show me . Show me is the advanced visualization tool in Tableau to make data visualization easy without writing any custom codes.

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

Tableau Operators: Arithmetic, Comparison and Logical
In this article we will discuss different operators in Tableau like arithmetic, comparison and logical operators.
Union in Tableau: Create, Rename and Remove
In this article, we have discuss union in tableau, how to create it manually and automatically using wildcards.
Different Types of Filters in Tableau
In this article, we will discuss different types of filters in tableau: Extract, Data Source, Context, Dimension, Measure, and Table Calculation Filter.

## 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

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

How to Create Context Filter in Tableau
In this article, we will discuss how to create context filter in tableau briefly with the help of example.
Types of Charts in Tableau
In this article, we will discuss different types of charts in Tableau: Bar, Line, Gantt, Histogram, Tree, Box and Whisker Plot.
Number Functions in Tableau: Mathematical, Trigonometric
In this article, we will discuss number functions in tableau like mathematical and trigonometric function.

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

Download this article as PDF to read offline

clickHere
About the Author
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

## Comments

We use cookies to improve your experience. By continuing to browse the site, you agree to our Privacy Policy and Cookie Policy.