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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

undefined

Hi All,

 

I have a table with few web IDs and its corresponding service IDs based on fuell type,Reason code and dates.

I want to sort the table in such a manner that My web IDs are sorted and all the columns associated with it i.e fuel type, reason codes, dates etc are sorted on its own as per web IDs.

Web IDService IDFuel TypeStatus Reason Created DateRecorded Date
10001S001SOLARE00124/06/2020 06:00:0025/06/2020 06:00:00
10001S002CNGE00425/06/2020 11:00:0027/06/2020 11:00:00
10001S003GASE00128/06/2020 08:00:0030/06/2020 08:00:00
10001S004SOLARE01028/06/2020 14:00:0029/06/2020 14:00:00
10002S123CNGE00425/06/2020 02:00:0027/06/2020 04:00:00
1000S212CNGE00122/06/2020 10:00:0025/06/2020 10:00:00
1000S216SOLARE01024/06/2020 16:00:0027/06/2020 18:00:00

 

I tried applying "Sort ascending" on Web id and then placing all the columns in the sort formula. i,.e {Colum1,ascending},{column2, ascending}

This is working fine in power query editor but as soon as i am applying close and apply, the sort is getting distorted.

 

Can anyone please help in this multi sort column issue please.

1 ACCEPTED SOLUTION
7 REPLIES 7
dax
Community Support
Community Support

Hi @Anonymous ,

As @lbendlin  mentioned, if you want to show specific sort, we usually sort this in visual part. Sort in power query will change when you put data in visual, it is just data model preview. You could refer to Table looks different in Query editor and Table View (third reply) for details.

By the way, you could refer to @lbendlin 's second link for multiple sort in visual. I forget this feature, he also share this feature to me.

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

dax
Community Support
Community Support

Hi @lbendlin ,

Oh, it's my mistake, I forget this feature. Thank you for your sharing! @lbendlin 

Best Regards,
Zoe Zhi

lbendlin
Super User
Super User

You don't need to sort in Power Query unless that is required for the next transformation steps.

 

In the Power BI UI you can put your data in a table and sort that table by multiple columns.

Anonymous
Not applicable

Hi @lbendlin ,

 

Thanks for the link. This trick works in the report tab(sift + left click) easily, I tried and it got successful.

 

I want to do it in the DATA tab for calculations.

Anyway is it possible on the data tab ?

Calculations in the data tab?

Anonymous
Not applicable

I am sorry,My bad 
Just an amatuer 🙂 
Thanks @lbendlin , @dax  for the solution.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors