Forum Discussion

12scml's avatar
12scml
Resolver I
9 years ago
Solved

Updating List

Hi everyone!

I am currently working with three tables that I need to combine into one. In each table, I have a "Name" column. I would like to stack the names on top of one another to create on supertable with all of their names. I don't need to copy the other columns, just make one with the list of names. The reason I'm trying to merge the names is so that I may constantly update each table and have a list of all names from all tables. Here's a sample image of what I'm hoping for:


Please note that I also want to be able to update the tables if I add names so that the list is also updated. I also made the demonstration through excel but would like to do it in Power BI!

Thanks!!

  • Hi 12scml,

     

    You can create a calculated table using below DAX formula:

    NewTable =
    UNION (
        SELECTCOLUMNS ( Table1, "Name", Table1[Name] ),
        SELECTCOLUMNS ( Table2, "Name", Table2[Name] ),
        SELECTCOLUMNS ( Table3, "Name", Table3[Name] )
    )

    It will update automatically when you refreshing the source tables (Table1, Table2, Table3).

     

    Best regards,
    Yuliana Gu

1 Reply

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Microsoft Employee

    Hi 12scml,

     

    You can create a calculated table using below DAX formula:

    NewTable =
    UNION (
        SELECTCOLUMNS ( Table1, "Name", Table1[Name] ),
        SELECTCOLUMNS ( Table2, "Name", Table2[Name] ),
        SELECTCOLUMNS ( Table3, "Name", Table3[Name] )
    )

    It will update automatically when you refreshing the source tables (Table1, Table2, Table3).

     

    Best regards,
    Yuliana Gu