Reply
Highlighted
Frequent Visitor
Posts: 3
Registered: ‎12-12-2018
Accepted Solution

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?


Accepted Solutions
Member
Posts: 83
Registered: ‎11-16-2018

Re: Create a new table from multiple tables

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 )

View solution in original post


All Replies
Member
Posts: 83
Registered: ‎11-16-2018

Re: Create a new table from multiple tables

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 )

New Contributor
Posts: 420
Registered: ‎04-14-2018

Re: Create a new table from multiple tables

@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]  ), 			  
			  )

 

 

Frequent Visitor
Posts: 3
Registered: ‎12-12-2018

Re: Create a new table from multiple tables

Thank you @mwegener !!

Frequent Visitor
Posts: 3
Registered: ‎12-12-2018

Re: Create a new table from multiple tables

Thank you @themistoklis !!

Member
Posts: 83
Registered: ‎11-16-2018

Re: Create a new table from multiple tables

You are welcome