Forum Discussion
Adding another column to a data table referencing results from another table? MERGE/LOOKUP??
- Anonymous6 years ago
Hi Anonymous
You may have a try by Merge.
Then we select two tables and Period columns in two tables:
Result:
However, when we use calculated table, we canāt use merge in Power Query Editor, so at this time we have to use Dax to build a calculated column.
Effective Date = LOOKUPVALUE ( 'Table'[Effective Date], 'Table'[Period], Data_Calculated[Period] )Result:
You can download the pbix file fro m this link:
Case_Adding another column to a data table referencing results from another tableMERGEorLOOKUP.pbix
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous , you want period Table 2 to table 1
If there is 1 to Many join between table 2 and Table
New column in table 1
Period = related(Table2[FY Period])
if they are not related to it, not 1 -M
Period = maxx(FILTER(Table2,Table2[effective Date]=Table1[Transcation Date]),Table2[FY Period])
In case you are looking for a period calculation
The tables currently aren't linked; table 2 is just a reference with the correct values for "effective date" which correspond to Period.