Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
amani1980
Frequent Visitor

Combine two columns...(Not Merge)

Hi,

 

I'm looking to combine data from two columns from different tables. Not merge. Each table has two columns country and event and I want to create a new table that contains both tables as shown below. I know I can do this by Append Query as New in Power Query. However, this slows the model a lot. I have shown only two columns of each tables whereas in reality there are more than 30-40 columns and 1000s of rows in each table. So append queries and delete the remaining columns is very tedious and slwos the data refresh. Is there any way I can pull only these two columns from the two tables directly and create a combined new table witout losing the relation between Country and Ticket? Model here....

 

amani1980_0-1730581171715.png

 

Thanks in advance,

-AM

 

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @amani1980 ,

 

try to write a calculated table like:

table3=

DISTINCT(

UNION(

    SUMMARIZE(

        table1, 

        table1[country],

        table1[ticket]

    ),

    SUMMARIZE(

        table2, 

        table2[country],

        table2[ticket]

    )

)

)

View solution in original post

3 REPLIES 3
FreemanZ
Super User
Super User

hi @amani1980 ,

 

try to write a calculated table like:

table3=

DISTINCT(

UNION(

    SUMMARIZE(

        table1, 

        table1[country],

        table1[ticket]

    ),

    SUMMARIZE(

        table2, 

        table2[country],

        table2[ticket]

    )

)

)

amani1980
Frequent Visitor

Hi,

 

Thanks for replying!

 

I want to do something similar not quite the same - I don't want to combine all columns from both tables. Just the Country and Ticket columns from the 30-40 colunms there is in each one of the tables. I showed just the two columns in the screenshot for sake of simplicity.

Irwan
Super User
Super User

hello @amani1980 

 

i might be misunderstood but perhaps what you are looking for is UNION().

 

here is a simple example:
- Table 1

Irwan_0-1730589641162.png

- Table 2

Irwan_1-1730589652809.png

- New Table with UNION() DAX

Irwan_2-1730589681389.png

 

Hope this will help.

Thank you.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.