0
0
Tableaubi_tool~10 mins

Ascending and descending sort in Tableau - Cell-by-Cell Formula Trace

Choose your learning style9 modes available
Sample Data

This data shows sales amounts for different fruit products.

CellValue
A1Product
B1Sales
A2Apples
B2150
A3Bananas
B3120
A4Cherries
B4180
A5Dates
B590
Formula Trace
SORT([Product], [Sales], ASC)
Step 1: List of products with sales: [(Apples,150), (Bananas,120), (Cherries,180), (Dates,90)]
Step 2: Sort products by Sales in ascending order
Cell Reference Map
    A        B
1 |Product | Sales
2 |Apples  | 150  
3 |Bananas | 120  
4 |Cherries| 180  
5 |Dates   |  90  

Sort uses column B (Sales) to reorder column A (Product).
The formula sorts the Product column based on the Sales column values.
Result
    A        B
1 |Product | Sales
2 |Dates   |  90  
3 |Bananas | 120  
4 |Apples  | 150  
5 |Cherries| 180  

Products are sorted ascending by sales.
The table shows products sorted from lowest to highest sales.
Sheet Trace Quiz - 3 Questions
Test your understanding
What product appears first after sorting ascending by sales?
AApples
BDates
CCherries
DBananas
Key Result
SORT(list_to_sort, sort_by_column, ASC|DESC) sorts the list ascending or descending by the chosen column.