Forum Discussion
patrick3
5 years agoHelper II
DAX - New table, adding specific values based on original column
Hi all, Not 100% sure how to explain this, but I'll try. Let's say ive got a table with 2 columns: UserId, Package Code And another table with 2 columns: Package Code, Product Code ...
- 5 years ago
Hi,
In the Query Editor, merge Table2 into Table1 based on the Package Code. If a Package code has multiple Product codes, then multiple lines will get created in the merged dataset.
Samarth_18
5 years agoCommunity Champion
Hi patrick3 ,
You can directly create a column in table 1 with below code:
column = lookupvalue(table2[product_code],table2[Package Code],table[Package Code])
Please let me know if i am gettting your question correctly.
patrick3
5 years agoHelper II
Sorry, I may not have explained well - that would work only if there was 1 Product Code per package but there would be multiple.