- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Create a new table from multiple tables
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-12-2018 03:55 AM
Hi,
I'm trying to joining multiple tables and i dont know how to do it.
Table 1:
id | name | value |
1 | aaa | 123 |
2 | bbb | 234 |
3 | ccc | 345 |
Table 2:
id | name | value |
1 | aaa | 432 |
2 | bbb | 543 |
4 | ddd | 154 |
5 | eee | 346 |
6 | fff | 908 |
Expected result:
id | name | Table1.value | Table2.value |
1 | aaa | 123 | 432 |
2 | bbb | 234 | 543 |
4 | ddd | null | 154 |
5 | eee | null | 346 |
3 | ccc | 345 | null |
6 | fff | null | 908 |
I tried to append, merge this queries using FULLOUTERJOIN, however i wasnt successfull.
Someone please can help me?
Solved! Go to Solution.
Accepted Solutions
Re: Create a new table from multiple tables
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-12-2018 04:04 AM
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 )
All Replies
Re: Create a new table from multiple tables
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-12-2018 04:04 AM
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 )
Re: Create a new table from multiple tables
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-12-2018 04:18 AM
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] ), )
Re: Create a new table from multiple tables
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-12-2018 04:35 AM
Thank you @mwegener !!
Re: Create a new table from multiple tables
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-12-2018 04:35 AM
Thank you @themistoklis !!
Re: Create a new table from multiple tables
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-12-2018 04:37 AM
You are welcome