- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Power BI Data Tables Not Maintaining Column Order
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
01-11-2019 12:20 PM
Hi,
In Power Query, I sorted a table per the below example:
Column_abc, Column_bcd, Column_cde
When I close and load the table and view it in the Data Table view it has a different column order:
Column_bcd, Col_abc, Col_cde
Why would the data table change the column order?
Additionally, when I copy the table and paste it into Excel it combines all columns as one column despite clearly being 4 separate columns in Power BI. Any ideas why this would happen?
Thanks!
Solved! Go to Solution.
Accepted Solutions
Re: Power BI Data Tables Not Maintaining Column Order
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
01-12-2019 02:57 AM
Hi @SBuri
take a look at this blog post:
https://blog.crossjoin.co.uk/2018/12/18/power-bi-and-column-order-in-m-queries-and-dataset-tables/
Did I answer your question? Mark my post as a solution!
Proud to be a Datanaut!
All Replies
Re: Power BI Data Tables Not Maintaining Column Order
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
01-12-2019 02:57 AM
Hi @SBuri
take a look at this blog post:
https://blog.crossjoin.co.uk/2018/12/18/power-bi-and-column-order-in-m-queries-and-dataset-tables/
Did I answer your question? Mark my post as a solution!
Proud to be a Datanaut!
Re: Power BI Data Tables Not Maintaining Column Order
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
01-13-2019 11:30 PM
hi, @SBuri
1. I'm afraid it couldn't achieve that sort the column order in Power BI data pane for now.
and for column order which you had sorted, you could use the method as LivioLanzo provided.
2. when I copy the table and paste it into Excel it combines all columns as one column despite clearly being 4 separate columns in Power BI.
After my test, it works well. So please check when you paste it into excel, whether you had paste it into one cell?
Best Regards,
Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Re: Power BI Data Tables Not Maintaining Column Order
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
01-14-2019 08:25 AM
This solution worked, thanks!
Re: Power BI Data Tables Not Maintaining Column Order
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
01-14-2019 08:28 AM - edited 01-14-2019 08:28 AM
Hi Lin,
Thanks for the reply! After applying Livio's solution, Power BI is now pasting the table into mutliple columns as it should. I am 99% that this was not a user error and is a bug, perhaps one that occurs when a table is split in two, then appended as new and with the sort order changing.
In any event, problem solved, thanks!