Forum Discussion
Require help with power bi modelling
Hello all,
I have a query on power bi modelling , if table 1 has columns A & B and table 2 has columns A & B. When i try to join table 1 & table 2 the join should work in such a way that if column A doesnt match it has to look for matching value in column B.
When i join these two tables , row2 is missing from table 2 of column A then the join should happen on column B of table 1 & 2.
Thanks in advance,
- Anonymous4 years ago
Hi Anonymous ,
Generally speaking, a join relationship between two tables associates a column in a table with a column in a different table, and cannot connect multiple columns of the two tables based on conditions
You can try to create a bridge table
1. Home – Append Queries – Append Queries as New
2. Select the two columns of the table Append1, right click - Remove Duplicates.
3. Select column [B] of table Append1, right click - Remove Duplicates.
Result:
4. Use [A] of Table1 to connect [A] of Append1, and [B] of Table2 to connect [B] of Append1
This is the related document, you can view this content:
https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-relationships-understand
https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-create-and-manage-relationships
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- amitchandak
Super User
Anonymous , You can try option in power query merge
Append & Merge: https://radacad.com/append-vs-merge-in-power-bi-and-power-query - AnonymousNot applicable
Hi Anonymous ,
Generally speaking, a join relationship between two tables associates a column in a table with a column in a different table, and cannot connect multiple columns of the two tables based on conditions
You can try to create a bridge table
1. Home – Append Queries – Append Queries as New
2. Select the two columns of the table Append1, right click - Remove Duplicates.
3. Select column [B] of table Append1, right click - Remove Duplicates.
Result:
4. Use [A] of Table1 to connect [A] of Append1, and [B] of Table2 to connect [B] of Append1
This is the related document, you can view this content:
https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-relationships-understand
https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-create-and-manage-relationships
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.