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
luisseneto
New Member

Create a new table from multiple tables

Hi,

 

I'm trying to joining multiple tables and i dont know how to do it.

 

 

Table 1:

idnamevalue
1aaa123
2bbb234
3ccc345

 

Table 2:

idnamevalue
1aaa432
2bbb543
4ddd154
5eee346
6fff908

 

Expected result:

idnameTable1.valueTable2.value
1aaa123432
2bbb234543
4dddnull154
5eeenull346
3ccc345null
6fffnull908

 

I tried to append, merge this queries using FULLOUTERJOIN, however i wasnt successfull.

Someone please can help me?

1 ACCEPTED SOLUTION

Hi @luisseneto,

 

1. rename the value columns (Table1.value, Table2.Value)

2. Append Table1 & Table2

3. Group by id, name (Sum Table1.Value, Table2.Value )

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


View solution in original post

5 REPLIES 5
themistoklis
Community Champion
Community Champion

@luisseneto

 

Create a new table and add the following formula:

 

Table = UNION(SELECTCOLUMNS(Table1,"ID", Table1[id],"Name", Table1[name],"Value1", Table1[value],"Value2", ""  ), 
              SELECTCOLUMNS(Table2,"ID", Table2[id],"Name", Table2[name],"Value1", "","Value2", Table2[value]  ), 			  
			  )

 

 

Thank you @themistoklis !!

Hi @luisseneto,

 

1. rename the value columns (Table1.value, Table2.Value)

2. Append Table1 & Table2

3. Group by id, name (Sum Table1.Value, Table2.Value )

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Thank you @mwegener !!

You are welcome

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


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.