Forum Discussion
Self-referencing Columns Won't Stay Put Upon Power Query Refresh
Thank you, Yalan. I have read that article before, but it seems to be about keeping collumn rows in sync. This is not my problem. I am asking strictly about the column headers. When I refresh the power query, my self referencing column headers (the custom ones that reference the query columns) change order.
- Ctisa873 years agoNew Member
Please see the example below. The first table is how I would like the column headers to remain organized. The second table is what happens when I refresh the query. The formulas still work and the values are correct, the columns themselves are just out of order.
Job Time Additional Service 1 Additional Service 1 Billout Additional Service 2 Additional Service 2 Billout 3 N/A 0.00 N/A 0.00 4 Remote Job $25 N/A 0.00 Additional Service 1 Billout Additional Service 2 Job Time Additional Service 2 Billout Addtional Service 1 0.00 N/A 3 0.00 N/A $25 N/A 4 0.00 Remote Job - jbwtp3 years agoMemorable Member
Hi Ctisa87,
There is a command in PQ Table.ReorderColumns() which deals with this.
Just manually (using your mouse) move the colunms into positions that you prefer them to be and they should fall into places in the output.
Cheers,
John
- Ctisa873 years agoNew Member
Does this solution work for columns that are not part of the power query? For instance, the columns that move are the ones I add in excel after the power query has already been performed.