Forum Discussion
JamieH
Helper I
3 years agoLeft Join to table with multiple records but return one row
I need help with joining two tables in PowerQuery and hoping someone smart can assist. I need to join a TableA which has one record per AppID to TableB which has multiple AppID's (the Primary Key...
serpiva64
Solution Sage
3 years agoHi,
please post sample data
JamieH
Helper I
3 years agoHi,
Here is some data examples. The highlighted rows are the rows to bring back on the join, using the above written logic:
TableA
| AppID |
| 1001 |
| 2001 |
| 3001 |
| 4001 |
TableB
| Row Number | AppID | SystemDate | SystemRecord | Column4 | Column5 |
| 1 | 1001 | 05 February 2023 | Q | ||
| 2 | 1001 | 07 February 2023 | T | ||
| 3 | 1001 | 06 February 2023 | Q | ||
| 4 | 1001 | 08 February 2023 | T | ||
| 5 | 2001 | 08 February 2023 | F | ||
| 6 | 2001 | 06 February 2023 | Q | ||
| 7 | 2001 | 08 February 2023 | T | ||
| 8 | 3001 | 05 February 2023 | T | ||
| 9 | 4001 | 04 February 2023 | Q | ||
| 10 | 4001 | 04 February 2023 | T |