Forum Discussion
Union column order
From the documentation, regarding UNION, it says: Columns are combined by position in their respective tables.
So you could use SUMMARIZE with TableB like:
Table F =
UNION (
SUMMARIZE ( TableA, TableA[a6], TableA[a8x], "hits", COUNT ( TableA[a5] ) ),
SUMMARIZE ( TableB, TableB[b2], TableB[b1], TableB[b3x] )
)
At least the columns order is predictable.
Tom
I tried this, but similar to using SELECTCOLUMNS, the calculated column still wants to become the first column.
- P3Tom9 years agoHelper I
Interesting!
I tried my solution before posting and had no difficulty creating a desired column order.
Tom
- Anonymous9 years agoNot applicable
I wish we could UNION on something less arbirary than column order. I believe APPEND in query editor uses column names.\
*edit* Unfortunately, I can't use append or model my data in the query editor. I had to use UNION to join my source data which is separated by month. I don't need the past months' data to refresh. If I were to APPEND those tables, even if they were flagged not to refresh they would refresh.