Sorting and Top N Analysis in Tableau

Sorting in Tableau - 

Lets Understand sorting in Tableau by Creating a simple Example -

1. I have already extracted data of few customer, Now the first step is go to your  worksheet and Choose a Field like I choose Customer Name from dimension and drop in Column Shelve
2. Add Sum(Sales) in Row Shelve.
3. Click on Customer Name (Drop down)in Column Shelve and Choose Sort
Sorting in Tableau Step 1


4. Now in Sort Popup Window Choose the Sort by option, like Data Source order, Alphabetic, Field, Manual or Nested. I want my Visualization sorted based on Sum(Sales), so I choose Field Option.
5. Now Choose type of sort you want like Ascending or Descending radio button as per your requirement.
6. Now Choose Field Name and the aggregate Function, like I want sorting based on Sum of sales amount so Choose Sales in Field Name and Sum in Aggregation.

Sorting in Tableau Step 2
You can also do sorting by Clicking on sort button available near the Axis Caption Name (See small little video available below)
Sorting in Tableau Step 3


Top N Analysis - 

Suppose we have to perform Analysis based on top 10 cities based on Profit. so here are few steps to do that - 
We need to create a report of top 10 Cities based on Profit and we also want to showcase Sales of those cities in Graph

1. Create a Set of Top 10 Cities based on Profit see in Below images  - 

Top N Analysis step 1


2. Give any Name for your newly created Set, and select Top 10 in By Field Section from Create Set pop - 

Top N Analysis step 2

3. Add Newly created Field from sets to Column Shelve and add Sales and Profit in Row Shelve 

4. Click on Drop down for Sum(Profit) as shown in below image and Choose Dual Axis to create a Dual Axis Chart
  
Top N Analysis step 3

5. See Below Analysis created by above step, it has Sales and Profit for top 10 Cities(Who has highest profit)

Top N Analysis step 4

Post a Comment

0 Comments