Forum Discussion
Merge two Tables and add Custom columns
- 9 years ago
Hi mrvamsidhar,
As per my understaning, you are trying to merge two tables which means you want a new table containing all the columns in Nov Table and Dec Table, right?
If that is the case, to address the problem that there is no unique column values to map tables, you can combine three columns into a single one as unique column.
Repeat above step in Dec Table. Then, you can merge these two tables.
Alternatively you can achieve the same result using DAX. Just use LookUp value to fetch the [DEC Rate] from Dec Table and insert into Nov Table.
December Rate = LOOKUPVALUE ( Dec[DEC Rate], Dec[Subscription], Nov[Subscription], Dec[InstanceID], Nov[InstanceID], Dec[Category], Nov[Category] )To your second requirement, what do you mean add aditional columns after merging two tables? What aditional columns do you want to add? You can add calculated column via writing DAX formula. Also, in query editor, under the Add Column pane in the top ribbon, you can select to create custom columns.
If I have something misunderstood, please correct me and provide more description about your expect result.
Thanks,
Yuliana Gu
Hi mrvamsidhar,
As per my understaning, you are trying to merge two tables which means you want a new table containing all the columns in Nov Table and Dec Table, right?
If that is the case, to address the problem that there is no unique column values to map tables, you can combine three columns into a single one as unique column.
Repeat above step in Dec Table. Then, you can merge these two tables.
Alternatively you can achieve the same result using DAX. Just use LookUp value to fetch the [DEC Rate] from Dec Table and insert into Nov Table.
December Rate =
LOOKUPVALUE (
Dec[DEC Rate],
Dec[Subscription], Nov[Subscription],
Dec[InstanceID], Nov[InstanceID],
Dec[Category], Nov[Category]
)
To your second requirement, what do you mean add aditional columns after merging two tables? What aditional columns do you want to add? You can add calculated column via writing DAX formula. Also, in query editor, under the Add Column pane in the top ribbon, you can select to create custom columns.
If I have something misunderstood, please correct me and provide more description about your expect result.
Thanks,
Yuliana Gu