Forum Discussion
Mile_josh
3 years agoNew Member
Add new column from existing table in new generated table (distinct and union)
I have multiple tables eg:
| Table1 | ||
| Url | Title | Temp URL |
| https://example.com/ | Page One | https://example.com/page1 |
| https://example.com/page2 | Page Two | |
| https://example.com/page5 | Page Five | https://example.com/pagefive |
| Table2 | |
| Url | Title |
| https://example.com/page3 | Page Three |
| https://example.com/ |
| Table3 | |
| Url | Title |
| https://example.com/page3 | Page Three |
| https://example.com/page4 | Page Four |
I want to generate a new table with a union with all tables and the value (URL) should be distinct. For all Table1 URLs, I also want Temp Url to be added to this newly generated table
| Generated Table | ||
| Url | Title | Temp url |
| https://example.com/ | Page One | https://example.com/page1 |
| https://example.com/page2 | Page Two | |
| https://example.com/page5 | Page Five | https://example.com/pagefive |
| https://example.com/page3 | Page Three | |
| https://example.com/page4 | Page Four |
Hi,
In the Query Editor, append the three tables and then Remove Duplicates.
4 Replies
- Ashish_Mathur
Super User
Hi,
In the Query Editor, append the three tables and then Remove Duplicates.
- Arul
Super User
I have generated some sample data for your requirement and written the formula to polpulate the third table. Please refer them,
Table 1:Table 2:
Table 3 (Populated usnig dax formula):
Table3 = UNION ( DISTINCT ( T1[Url] ), DISTINCT ( T1[Temp url] ), DISTINCT ( T2[Url] ) )Thanks,
Arul
- Ashish_Mathur
Super User
Hi,
Share some data to work with and show the expected result clearly.