Forum Discussion
Order of columns changes in Data View after Edit Query phase
Hi Yuliana Gu,
Data source is join of multiple SQL statements. Actually no conditional/custom columns were added to original table in Edit Query phase:
The problem is that I use this table to join with tables which has the same structure, and because column order is changed, union function does not provide correct results in Data View phase.
Alfredas81 and Yuliana,
I have the same problem.
I am combining data from multiple excel sheets in my query. One of the columns in the main query is created by using a lookup table (merge queries). This column appears in Query Editor in 72th position....when I close and apply it moves to 75th position. Only that column...all the other columns in Data View match their positions in Query Editor.
Thanks and regards,
Balazs
- freder1ck8 years agoKudo Kingpin
I would try setting the column positions manually ...
= Table.SelectColumns(#"Previous Step",{"Col 1", "Col 2", "Col 3", "Col 4", "Col 5"})Fred
- bbaranyai8 years agoFrequent Visitor
Thanks Fred,
This definitely helps.
However I tried another thing...I referenced the Query in the Query Editor (right click, Reference). I did not make any change in the referenced Query....after Close&Apply, in the Data View the column order of the table of the Referenced Query was perfectly matching the column order of the Query Editor's (both the original and the referenced Query...).
I am not sure if this is a feature or a bug :-)
Any idea?
Thanks
Balazs
- freder1ck8 years agoKudo Kingpin
I have no idea. Glad that you got it worked out!