cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
batmobile111
Regular Visitor

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 @batmobile111 ,

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 III
Super User III

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.

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?

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

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors