- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Merge columns from two tables
Hi,
I have two tables A & B.
Table A contains 4 columns: "CID", "Primary tag", "Age" & "Sales"
Table B contains 4 columns: "CID", "Digital tag", "Age" & "Sales"
Two tables share common column CID, each CID is unique. The only difference of two tables is that A contains "Primary tag" but B contains "Digital tag"
I want a new table, Table C,
Table C contains 5 columns: "CID", "Primary tag", "Digital tag", "Age" & "Sales".
in other words, I am trying to append "Digital tag" to Table A, or "Primary tag" to table B.
"Merge" under Query editor is not working as each table has over 4 million rows, any DAX codes I can apply to deliver that?
Thanks in advance !!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi tmacfrank,
Are the values in column CID same in the two tables? Do they have a relationship with each other like one-many, one-one or many-one? If they have, suppose Table A is on the "one" side, you may create a calculate table using DAX like pattern below:
Merged Table = SUMMARIZE ( 'Merged Table', 'Table A'[column CID], "Primary tag", 'Table A'[Primary tag], "Digital tag", RELATED ( 'Table B'[Digital tag] ), "Age", 'Table A'[Primary tag], "Sales", 'Table A'[Sales] )
Regards,
Jimmy Tao

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
07-30-2024 12:22 PM | |||
07-30-2024 08:47 AM | |||
09-17-2024 12:38 PM | |||
06-17-2024 02:56 AM | |||
08-22-2024 09:13 AM |
User | Count |
---|---|
117 | |
99 | |
84 | |
53 | |
47 |