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

Sort issue in Power Query

I have noticed some strange behaviour in Power Query when merging records.

 

If I have two tables which are sorted based on a date field and then merged, the sort is ignored at the Table.ExpandTableColumn stage of the query. I have noticed this as I had filtered to a single record on one side of the merge before conducting the merge and, once the merged query was expanded, the single record had been replaced by a record which had previously been filtered out.

 

The other scenario is where I have sorted the data based on a date field and then used Table.Distinct to remove duplicates (this is to only show the latest dated record). The sort order is ignored and a different record is selected - I would expect the first record to be retained.

 

Unfortunately, I cannot share the data as it is sensitive customer data.

 

I have found a way around the issues by adding either an index column or by using Table.Buffer. I was just wondering if there is a better solution for this or if this is indeed a bug with the software?

1 REPLY 1
Anonymous
Not applicable

This could be a bug.

Could you please replicate the issue with dummy data and raise a support ticket?

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.