Forum Discussion
Merging Queries with OR
- 4 years ago
In Power Query you would need to do two merges, one with each. Then keep the valid data you want with an if/then/else statement. You can do a conditional merge based on records as shown here but I think trying to do that with tables would be painfully slow.
Thank you to everyone for the responses!
edhans I ended up following your advice on the double-merge in Power Query. For reference, there were four additional columns from the other table that I needed to bring in.
Once I completed both merges, I was left with eight extra columns and because of the nature of the merges four of those columns were always null and four had all the values I wanted. I then created four additional conditional columns with the logic of, if this column is not null then use that value, however, if it is null then take the value out of this other column. That resulted in four columns that are always populated with the information I will need to build out my report.
Thank you so much for the guidance up to this point but I was curious to know what you thought of the strategy I used on this. Was this in line with the logic you were suggesting with the if/then/else statement?
yes, glad I was able to help bolaughlin - I think what you have described is the path I would have walked down myself to ultimately get the result.
If you could mark my answer as the solution I'd appreciate it - and it would show this as solved in the forums. Need any other help, always come back and ask away!