March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I have created a function which renames my columns based on the criteria I need with numbers in all the column headers.
So I need to order these columns based on these numbers in ascending order. See the below code where I manually ordered the columns.
Table.ReorderColumns(RemoveColumns,{"Viewfolder 1", "Viewfolder 2", "View 2", "Viewfolder 3", "View 3"})
This is a sample case with just 5 columns, but I have excel files with 100's of columns to order.
I prefer it if "viewfolder" is placed before "view", but it's not mandatory. Is there any way to achieve this using "M"
Solved! Go to Solution.
You should be able to add a new step in Power Query as follows:
Home > Choose Columns > Select All Columns > Sort A-Z > Name
as shown in the YouTube video Easy Trick for Sorting Columns in Power Query
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
143 | |
97 | |
79 | |
68 |