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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
wvuthha
Frequent Visitor

Dataflow - Sort order based on another column

 

Hi guys,
 
In PBI Desktop, you got to the data canvas, choose a column and you get the Column tools in the menu.
Here you can set a sort based on another column (-> Sort by column).
This is useful if you want to sort daynames after their daynumber in the week and not alphabetical.
 
I have created a dataflow, where I want to use this feature, too, but in dataflows, you don't have a data canvas.
Normally no problem, it is also only M. But I am not able to figure this out .
 
If I sort the column in "a normal way", I get this:
Table.Sort(#"Changed column type 5", {{"Aktueller Tag DEU", Order.Ascending}})
 
But I want to do the sort order based on the column "Tag der Woche". Could you help me here?
 
Best regards
Thomas
1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi Thomas,

 

There isn't a native way of doing this for the same reason there isn't a native way of doing it in Power Query:- because sorting by another column is a display/format function, not a data mashup/transformation function. I.e. there's absolutely no point doing this during ETL in either Dataflows or Power Query. They're designed to mashup/transform data into efficient structure, not to make it look pretty.

You're essentially wasting resources by doing anything in either Dataflows or Power Query that is not specifically focussed on getting the data into an aggregated and/or efficient structure. This even includes basic 'prettifying' functions such as Sort and Reorder Columns etc. These all just get scrambled once sent to the data model anyway as Power BI changes the sort/structure of the table for Vertipaq compression.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

1 REPLY 1
BA_Pete
Super User
Super User

Hi Thomas,

 

There isn't a native way of doing this for the same reason there isn't a native way of doing it in Power Query:- because sorting by another column is a display/format function, not a data mashup/transformation function. I.e. there's absolutely no point doing this during ETL in either Dataflows or Power Query. They're designed to mashup/transform data into efficient structure, not to make it look pretty.

You're essentially wasting resources by doing anything in either Dataflows or Power Query that is not specifically focussed on getting the data into an aggregated and/or efficient structure. This even includes basic 'prettifying' functions such as Sort and Reorder Columns etc. These all just get scrambled once sent to the data model anyway as Power BI changes the sort/structure of the table for Vertipaq compression.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Kudoed Authors