0
0
Power BIbi_tool~10 mins

Sorting data in Power BI - Cell-by-Cell Formula Trace

Choose your learning style9 modes available
Sample Data

This table shows sales numbers for different fruits.

CellValue
A1Product
B1Sales
A2Apples
B2150
A3Bananas
B3120
A4Cherries
B4180
A5Dates
B590
Formula Trace
SORT(Table1, Table1[Sales], DESC)
Step 1: Table1[Sales]
Step 2: Sort sales values descending
Step 3: Reorder rows based on sorted sales
Cell Reference Map
    A        B
1 Product  Sales
2 Apples   150
3 Bananas  120
4 Cherries 180
5 Dates    90

Arrows: Sorting uses column B (Sales) to reorder rows.
The formula sorts the table rows by the Sales column values in descending order.
Result
    A        B
1 Product  Sales
2 Cherries 180
3 Apples   150
4 Bananas  120
5 Dates    90
The table is sorted so the fruit with the highest sales (Cherries) is first, and the lowest (Dates) is last.
Sheet Trace Quiz - 3 Questions
Test your understanding
Which product has the highest sales after sorting?
ACherries
BApples
CBananas
DDates
Key Result
SORT(table, column_to_sort_by, order) sorts table rows by the specified column in ascending or descending order.