Forum Discussion
Conditional Merge
- 6 years ago
That is a bit different than what I originally understood. I think a conditional merge is overcomplicating it.
Just do two merges, then some if/then/else logic on nulls.
See the attached file. This is in Excel because it was easier to get your tables loaded from a spreadsheet vs PBIs "Enter Data" screen.\
The lower green table is what you want the result to be. See the queries in Power Query.
I had to change the last record in your first table since you gave me all 71's in the ID RS field, which was a 100% match to the first table. I changed it to 93 and 300030001 for the ID_LOC field.
That is a bit different than what I originally understood. I think a conditional merge is overcomplicating it.
Just do two merges, then some if/then/else logic on nulls.
See the attached file. This is in Excel because it was easier to get your tables loaded from a spreadsheet vs PBIs "Enter Data" screen.\
The lower green table is what you want the result to be. See the queries in Power Query.
I had to change the last record in your first table since you gave me all 71's in the ID RS field, which was a 100% match to the first table. I changed it to 93 and 300030001 for the ID_LOC field.
thanks a lot! i didnt think of that way of doing it, if i change for example ID RS then the CC column will update right?