Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I am trying to join two tables (origin and destination) in power bi. There are some cases where it is creating multiple matches one value.
For example, the origin table has:
SHIPMENT NUMBER | STOP NUMBER |
36986 | STOP 1 |
36986 | STOP 2 |
36986 | STOP 3 |
the destination table has:
SHIPMENT NUMBER | STOP NUMBER |
36986 | STOP 2 |
36986 | STOP 3 |
36986 | STOP 4 |
Now when I join i WANT this case to look like below:
SHIPMENT NUMBER | STOP NUMBER | STOP NUMBER (DESTINATION) |
36986 | STOP 1 | STOP 2 |
36986 | STOP 2 | STOP 3 |
36986 | STOP 3 | STOP 4 |
But when I do an inner join it gives me more than just 3 rows. It looks like this:
SHIPMENT NUMBER | STOP NUMBER | DESTINATION. STOP NUMBER |
36986 | STOP 1 | STOP 2 |
36986 | STOP 2 | STOP 2 |
36986 | STOP 3 | STOP 2 |
36986 | STOP 1 | STOP 3 |
36986 | STOP 2 | STOP 3 |
36986 | STOP 3 | STOP 3 |
36986 | STOP 1 | STOP 4 |
36986 | STOP 2 | STOP 4 |
36986 | STOP 3 | STOP 4 |
I Dont't want multiple matches. Could someone please help me out? I would really really appreciate any guidance. Been stuck on this for a while now.
Solved! Go to Solution.
Generally data is not so simple in BI world...
The simplest solution is to insert an index in both the tables and do the merge on those 2 indexes and then remove indexes.
If rows match one on one for Shipment Number in both the tables, then above would work perfectly.
Otherwise create groups on Shipment Number, then perform better representative sample data.
Generally data is not so simple in BI world...
The simplest solution is to insert an index in both the tables and do the merge on those 2 indexes and then remove indexes.
If rows match one on one for Shipment Number in both the tables, then above would work perfectly.
Otherwise create groups on Shipment Number, then perform better representative sample data.