Forum Discussion
How to Join tables and Add column using DAX(Edit Query)
- Anonymous6 years ago
Providing you have a relationship, just add a column on Table A, the paste in the following
Degree = RELATED('Table B'[Degree]) - 6 years ago
Anonymous , one is merge table in edit query
https://radacad.com/append-vs-merge-in-power-bi-and-power-query
Dax way
https://www.sqlbi.com/articles/from-sql-to-dax-joining-tables/
New column in Table A
maxx(filter('Table B', 'Table A'[ID] ='Table B'[User ID]),'Table B'[Degree])
Anonymous
DAX way:
LOOKUPVALUE (when there is no relationship between tables)
Add a new column using following DAX
Degree = LOOKUPVALUE('Table B'[Degree],'Table B'[ID],'Table A'[ID])
RELATED (When the tables are related)
Degree 2 = RELATED('Table B'[Degree])
Related article:
https://www.vivran.in/post/dax-lookupvalue
https://www.vivran.in/post/dax-data-modeling-with-related-relatedtable
Cheers!
Vivek
If it helps, please mark it as a solution. Kudos would be a cherry on the top 🙂
If it doesn't, then please share a sample data along with the expected results (preferably an excel file and not an image)
Blog: vivran.in/my-blog
Connect on LinkedIn
Follow on Twitter