Forum Discussion
Losing data from PowerQuery Merge
- Oct 08, 2020
SaintEnt Okay! So you get an updated file every day and it happens that some orders no longer appear. Perhaps you need to apply a few extra steps to create a "new first" table. Tried to demonstrate it in the attached sheet. Perhaps a real PQ expert has a better idea.
I believe you got the idea. It's to update status of an order (so I can't actually provide the sheets).
So is there any way to be able to use power query to update the sheet, without losing data if the sheet I'm getting the newest information does not have the old info? Tried with different kind of merging, however, all unsuccessful.
SaintEnt Okay! So you get an updated file every day and it happens that some orders no longer appear. Perhaps you need to apply a few extra steps to create a "new first" table. Tried to demonstrate it in the attached sheet. Perhaps a real PQ expert has a better idea.
- SaintEntOct 09, 2020Copper Contributor
I got the idea, managed to duplicate it on your sheet, however, the issue with my work on file is that
my values in the beginning are nulls, after I merge my query with the newest information they receive some value, which is dependent on the updaters file(let's call it like this) and when the updaters file removes the old information - it all gets back to nulls. Afterwards, when the conditional columns start working, the whole query refreshes and it becomes nulls again.
Any ideas?
- Riny_van_EekelenOct 09, 2020Platinum Contributor
SaintEnt Difficult to visualise the issue here. Instinctively, I would say that you delete the null rows before merging. Can't you send a mock-up of the two data sets that need to be merged, indicating how the end result should look like. just few rows and columns. It doesn't have to contain any real data.
- SaintEntOct 09, 2020Copper Contributor
Hello again,
I've made up some information:
First, you will see the original data, with only OrderID. On table Date1Oct (marked with the light blue as well), is the information originally entered on the said date. After that I receive the new information, which is Date2Oct table (but actually just replacing the information - as my original files have the same rows/columns), and place Date2Oct on the Date1Oct, you will see how the nulls go back to the table.
And will get some examples because my explanation might be confusing --->
Info from Oct1
Info from Oct2
The rows became nulls again, as there is no hardcopy of the data and I'm trying to figure a way around that.
- SaintEntOct 08, 2020Copper Contributor
Riny_van_Eekelen
Looks like it works with Full outer join, perhaps the info in my data set has some difference in the data itself. As I tried it earlier, it got me some empty rows, will test it and will see if it works tomorrow morning.Thank you!