Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
CWitts
Frequent Visitor

Sorting multiple columns

I have a direct query from Oracle database which is correctly sorted on import.  When I go to transform data, I can set the sort I want (four different column) and the result is correct.  However, when I create a table the sort is being completely ignored, so the end user is not going to see the information as I need them to. 

Does anyone have any ideas on why this is and how I can resolve it?

4 REPLIES 4
Ttaylor9870
Helper III
Helper III

Hi @CWitts,

 

You could maybe make a calculated column using SWITCH to assign e.g ABC = 1 then sort whatever column you want based on the results of that swtich statement. You can sort your column by clicking on model view then finding the column you'd like sorted and and assign the newly created SWTITCH statment in this field...

 

Ttaylor9870_0-1677169754853.png

Many Thanks,

 

Taylor 😎

 

Ttaylor9870
Helper III
Helper III

What are the 4 columns and what order do you want them ordered? I have solved a similar issue before

I want to sort the following:  Customer number, Item, numerical number of type of item (1, 2, 3) and sequence number

CWitts
Frequent Visitor

Further clarification:  I have a large data set and for each "customer" there are multiple items that are listed and against each item, sub groups. EG

Row number Customer  Item        Numerical number of type    seq
001 ABC       Fruit      1                           001
002 ABC       Fruit      1                           002
003 ABC       Veg        1                           001
004 ABC       Veg        2                           001
005 XYZ       Fruit      3                           001   
006 XYZ       Fruit      1                           001
007 XYZ       Fruit      1                           002

 

I need to sort this so all ABC rows are together with Fruit above Veg, type 1 above type 2, etc.  So the above would resort wo row number 005 would appear at the bottom.

 

Hope that helps.

 

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.