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
Brjt1
Frequent Visitor

How to sort in Power Query

I’ve been working on sorting the date table's month column in chronological order within the data lake setup. Since I’m using Gen2, sorting the tables directly in Power BI isn’t an option because it’s all enabled on the backend. I tried creating a custom IF statement, and it organizes correctly if I retrieve the data through a dataflow using get data. However, when accessing the same data via the data lake, the custom columns appear, but the sorting doesn’t work.

Given these challenges, would it be acceptable to use the get data option from the dataflow instead of the data lake? My concern is ensuring a consistent and reliable sorting experience. Since the company will rely on the method I recommend, I want to propose the best approach.

1 ACCEPTED SOLUTION
Brjt1
Frequent Visitor

I figured it out you sort thru the data modeling tab in the data lake

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

Sorting rows is one of the most expensive and often futile actions in Power Query.  It breaks streaming ( requires loading of the entire data frame) and is totally ignored in the downstream systems.

 

The best sort is the one you don't do.

I would prefer to sort it in power bi but the issue is when you pull from the data lake it does not allow you the option to sort in power bi since the table section is enabled. So I have to figure out how to show month in chronological order in power query Gen2.

 

Brjt1
Frequent Visitor

I figured it out you sort thru the data modeling tab in the data lake

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!

Jan NL Carousel

Fabric Community Update - January 2025

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