Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Merge another column from another table, the current table is using the function "SELECTCOLUMNS"

Hello community, 

 

I'm creating a new table "A" using "SELECTCOLUMNS" function. until here no problem. 

the issue starts when I want to add a new columns from another table to the new table "A".

I tried to use "UNION" but got this message:

 

"each table argument of 'union' must have the same number of columns"

 

Any help?

 

many thanks!

 

  • Hi Anonymous ,

     

    UNION will merge two tables with the same number of columns. The reason you get this error is that one table has one column but another table has many columns.

    If you want horizontal combine two tables please consider using CROSSJOIN() Vertical splicing tables, using UNION(). 

     

    or use Power Query Editor,please refer this article.

     

    Best Regards

    Community Support Team _ chenwu zhu

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

2 Replies

  • v-chenwuz-msft's avatar
    v-chenwuz-msft
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    UNION will merge two tables with the same number of columns. The reason you get this error is that one table has one column but another table has many columns.

    If you want horizontal combine two tables please consider using CROSSJOIN() Vertical splicing tables, using UNION(). 

     

    or use Power Query Editor,please refer this article.

     

    Best Regards

    Community Support Team _ chenwu zhu

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.