Forum Discussion
Add a Column in a table to another table
Hi,
How to add a column "Week No." which is in 'Table A' to the columns in Table B
Anonymous
Ensure both Table A and Table B have a common column
Go to the Model view in Power BI, and drag the common column from Table A to Table B to create a relationship.
Create a new column in Table B
Week No. = RELATED('Table A'[Week No.])π If this helped, a Kudos π or Solution mark would be great! π
Cheers,
Kedar
Connect on LinkedIn
3 Replies
- AlexTheGreatResolver II
You can achieve this via Power Query
Go to Power Query Editor -> PQE Home -> Merge Queries -> Left join
- rajendraongole1Super User
Hi Anonymous - Ensure that there is a common column (a key) between Table A and Table B to make the merge successful. Without a common key, Power BI will not be able to match rows between the two tables.
In PQ editor you can use merge query and join Left Outer Join ensures all rows from Table B are kept, with matching "Week No." values added from Table A.
Hope this helps.
- Kedar_PandeSuper User
Anonymous
Ensure both Table A and Table B have a common column
Go to the Model view in Power BI, and drag the common column from Table A to Table B to create a relationship.
Create a new column in Table B
Week No. = RELATED('Table A'[Week No.])π If this helped, a Kudos π or Solution mark would be great! π
Cheers,
Kedar
Connect on LinkedIn