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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Combine the same columns from different table

Hi ! I found this link, that's exactly what I want to do but for more than one column in common. 
https://community.powerbi.com/t5/Desktop/Combine-the-Same-Columns-from-Three-Tables-into-One-Slicer/...
In this example , the user only have the "contract number" in common, and i have more: ID, Title...etc I want to merge these differents columns in a new table
I tried to change the formula to do what I want but it appears that I'm not that good with DAX ... Is that possible, and if yes can anyone help me? Smiley LOL

Thanks!

1 ACCEPTED SOLUTION
dax
Community Support
Community Support

Hi HugoDEVILLIER,

According to your dscription, it seems that you want to  combine specific columns from different tables into a new table, right?

If so, you could try below M code

let
    Source = Table.Combine({Table.FromColumns({c1[name],c1[status]},{"Table1 Column1","Table1 Column2"}), 
    Table.FromColumns({c2[cname],c2[descrip]}, {"Table1 Column1","Table1 Column2"}),
    Table.FromColumns({t2[month],t2[ltm]}, {"Table1 Column1","Table1 Column2"})})
    in
    Source

366.PNG

Best Regards,
Zoe Zhi

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

 

View solution in original post

3 REPLIES 3
Deepak_Kavin
New Member

I need to combine These three Table with same Coulmn names into a new table

Deepak_Kavin_0-1654491148647.png

 

I tried to Create but as per the below Solution

Deepak_Kavin_1-1654491168388.png

 

But it is showing below error

 

Deepak_Kavin_2-1654491194132.png

 Please help me on this

 

 

dax
Community Support
Community Support

Hi HugoDEVILLIER,

According to your dscription, it seems that you want to  combine specific columns from different tables into a new table, right?

If so, you could try below M code

let
    Source = Table.Combine({Table.FromColumns({c1[name],c1[status]},{"Table1 Column1","Table1 Column2"}), 
    Table.FromColumns({c2[cname],c2[descrip]}, {"Table1 Column1","Table1 Column2"}),
    Table.FromColumns({t2[month],t2[ltm]}, {"Table1 Column1","Table1 Column2"})})
    in
    Source

366.PNG

Best Regards,
Zoe Zhi

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

 

Anonymous
Not applicable

Hi, 
Yes ! That's perfect I would never have found by myself, Thank you so much!

HD

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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