Forum Discussion

123117's avatar
123117
Frequent Visitor
4 years ago

UNION tables

Hey, 

I wanted to use union to combine four tables, all with different number of columns and different column values, apart from one same column of 'code number' among all columns. How to do that? 

 

Please help me out 

 

Thanks!

7 Replies

  • HotChilli's avatar
    HotChilli
    Community Champion

    I don't think you can use UNION for this.

    Maybe a merge in Power Query but perhaps you can explain further your desired result? with an example?

    • 123117's avatar
      123117
      Frequent Visitor

      Hey,

      Thanks for your reply 

      Here's an example of the tables, the columns are separated by | 

      All tables have different number of columns 

       

      Table 1

      Code | Description | X | Y | Z

       

      Table 2 

      Code | Description | A | B | C | D | E 

       

      Table 3

      Code | Description | Date | L 

       

      Table 4 

      Code | Description | R | S | T | U | V | W

       

      Result output: 

      Code | Description |  X | Y | Z | A | B | C | D | E | Date | L | R | S | T | U | V | W 

       

      Basically the result should be all the columns combined and then Ill add some measures too 

      And all the columns combined with values corresponding to the code.