Forum

Power Query doubles...
 
Notifications
Clear all

Power Query doubles my data when appending

10 Posts
6 Users
0 Reactions
1,421 Views
(@cmoon13)
Posts: 1
New Member
Topic starter
 

I have an Excel file with 20+tabs that contain the same workbook for different accounts.  I have created named tables for each account and loaded in PQ via "from table" creating connections only.  When I append the data to load into one query all my data is duplicated.  How can I avoid this? I will be revising these tables often, and can manually delete the duplicates from the query, however know I must be doing something wrong.  Any suggestions appreciated!

 
Posted : 28/10/2017 11:26 am
(@catalinb)
Posts: 1937
Member Admin
 

Hi,

Can you share your query?

 
Posted : 29/10/2017 12:33 am
(@mynda)
Posts: 4761
Member Admin
 

Hi,

It sounds like your final query is included in the append?

Mynda

 
Posted : 31/10/2017 6:20 am
(@ritak)
Posts: 10
Eminent Member
 

If you have multiple sheets and multiple named tables, it might happen that you add the data twice - once from the table and once from the sheet.

 
Posted : 01/11/2017 10:01 am
(@redsh0es)
Posts: 3
New Member
 

I have almost the same problem.

I append 2 files that contain only 1 sheet. but the values doubled after I appended. Anyone have an idea on this?

 
Posted : 10/11/2018 9:18 pm
Anders Sehlstedt
(@sehlsan)
Posts: 971
Prominent Member
 

Hi Dorothy,

It is always easier to give help if there is a file attached, so we can see the data.
You don't have to have the real data in, just some sample data is good enough to visualize the problem.

My experience with appending data and you get doubles, it is because there are two or more exact data rows from the different sources.

But if this is the case for you or not is hard to tell without a file to check.

Br,
Anders

 
Posted : 11/11/2018 11:30 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Dorothy,

I suspect the query is getting data from all tables/sheets in the files. You're probably then loading your query into a sheet/table in the same file, it's then getting loaded into Power Query again. This is usually the culprit. If that's not it, please share your file or queries so we can take a closer look.

In future, please start a new thread with your question and sample file.

Thanks,

Mynda

 
Posted : 12/11/2018 7:15 pm
(@redsh0es)
Posts: 3
New Member
 

Hi Mynda,

I think you're right. How can I fix this if both files are being loaded? I just need the appended one.

Thanks,

Dorothy

 
Posted : 11/12/2018 4:25 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Dorothy,

Edit the query and after the 'Source' step and add a filter that excludes the name of your query table. Just select the Source step, then apply a filter. It will ask you if you want to insert a step.

I usually try to name my query table something distinctly different to the names of my source data table for this very reason.

Mynda

 
Posted : 12/12/2018 8:00 am
(@redsh0es)
Posts: 3
New Member
 

Hi everyone, I tried every advise you said but still it doesn't work. What I did as workaround was remove the append of the two files then hit load. That seem worked.

 
Posted : 18/12/2018 7:30 am
Share: