Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I have many tables that i wish to union but some of them gave me the wrong columns order. Some threads here have given solution like using the formula [SELECTEDCOLUMN] but that only works practically very well if you have 2 tables.
How it happened
There is an existing table (let's call it UnionTable) with 4 years worth of datapoints from 4 different tables (T1T2 T3 T4). Then i worked on the UnionTable, thereafter adding some columns that i needed for some calculation. I then wanted to add extra tables (T5 T6) so i copied the formula i used for T1 (just with different filter cause i wanted a table with that information). When i added T5 T6 into the Union Formula for UnionTable, the columns just went haywire.
Is there any way to solve this thing without having to use the SELECTEDCOLUMNS formula because then i have to manually override the formula for all the 6 tables (or even more if i have more tables)
Any help/advice is greatly appreciated.
Hi @rogerching90 ,
That is the behavior of UNION. Unlike append in Power Query, UNION does not combine tables based on column nameS but by position in their respective tables. Thus the use of SELECTCOLUMNS to reposition the columns prior to UNION.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.