Forum Discussion
majdkaid22
Helper V
9 years agoReorder columns in Query Editor without listing the column names
Hi guys, am doing union dax for 10 tables. While the process is easy, my columns in each table are not in the same order. In power Query, all the columns in 10 tables are in the exact same o...
- 9 years ago
hi majdkaid22,
You may reorder your columns in power query alphabetically using a custom code.
=Table.ReorderColumns( NameOfPreviousStep, List.Order( Table.ColumnNames( NameOfPreviousStep ), Order.Ascending )
v-jiascu-msft
Microsoft Employee
9 years ago
Hi Majd,
What kind of union do you want to do? If it's "Merge Queries", the order won't be a problem. If it's "Append Queries", Power BI will take it in a intelligent way according to my test. (Maybe it could go wrong). Please have a try.
Are the tables Excel tables? If so, please make sure they are all tables, not ranges.
Best Regards!
Dale
- v-jiascu-msft9 years ago
Microsoft Employee
Hi majdkaid22,
Could you please tell me if your problem was resolved? Please mark the proper answer if it worked. That will be a help to the others.
Best Regards!
Dale