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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

Power Query refresh deletes "sort by column" settings

I'm having a problem in Desktop that's affected others in the past, I think due to bugs that have been fixed in past releases

 

When I edit and then refresh tables in Power Query, I lose any "sort by column" settings in the corresponding tables or any made via dependent queries in PQ

 

I'm using the December 2020 version of Desktop

 

Any fixes or tips? It makes maintaining tables error-prone and laborious 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks for trying, @v-jingzhang 

 

I think it's actually a problem within Tabular Editor ( @dotykier  ) because when I set the sort order column within Power BI Desktop, the problem doesn't occur

View solution in original post

7 REPLIES 7
PhilipTreacy
Super User
Super User

Hi @Anonymous 

Do you mean that your sorting steps are giving you unexpected results after a refresh?

You can try using Table.Buffer to make the table's sort reliable, like

= Table.Sort(Table.Buffer(Source),{{"Column1", Order.Ascending}})

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


amitchandak
Super User
Super User

@Anonymous , We have not seen this behavior. I doubt anyone else reported that too - https://community.powerbi.com/t5/Issues/idb-p/Issues

 

Are you doing any change columns, which are involved ?

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak - here's an example of it happening before:

https://community.powerbi.com/t5/Desktop/Sort-by-columns-all-lost-after-data-refresh/td-p/352772

 

@PhilipTreacy  - here's a picture illustrating the "sort by column" setting that is being erased (here it is set correctly)

charliedata_0-1609338154012.png

 

Hi @Anonymous 

 

I tested "sort by column" feature on Power BI Desktop Version: 2.88.802.0 64-bit (December 2020) and couldn't reproduce it. I used a common scenario to test: sort month name by month number, and it worked well. Can you share some steps or sample pbix file (removing sensitive data) to help us reproduce your problem? Thanks.

 

Best Regards,
Community Support Team _ Jing Zhang

Anonymous
Not applicable

Thanks for trying, @v-jingzhang 

 

I think it's actually a problem within Tabular Editor ( @dotykier  ) because when I set the sort order column within Power BI Desktop, the problem doesn't occur

Please be aware that modifying column properties (such as the "sort by column" property) is not currently supported by the External Tools integration (preview): https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-external-tools#supported-write-oper...

Anonymous
Not applicable

Thanks @dotykier ! I didn't realise that 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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