# Can't Delete Query "Being referenced by other queries"



## jgrob3 (Dec 5, 2014)

I have a client that has 24 months' of data (52 queries) loaded into PowerQuery, with 200K-700K of records in each query.

They've been appending each query to the previous data to create a single large table of data that can then be used by PowerPivot for reporting.

From time-to-time, the data in one of the old queries is revised & so they need to delete some months' of old data in order to bring new data in however every time they attempt to do this, they get the error noted above "Being referenced by other queries" and it prevents them from deleting the query.

Q1: Is there a way around this?

Q2: PowerQuery is now taking over an hour to append new data to the table.  Are there any suggestions to make this faster?

Thanks in advance.

Jeff


----------



## scottsen (Dec 5, 2014)

This looks like a job for Chris Webb... I'll try to summon


----------



## miguel.escobar (Dec 5, 2014)

Hey Jeff!

I think that you could apply this same concept instead of creating 52 queries:
Combining Data From Multiple Excel Workbooks With Power Query–The Easy/Complete/Power BI Ready Way! | The Power User

Also, you could create a function that would act on a per row basis:
https://www.youtube.com/watch?v=2g00mwxY5cs


since there's the referencing issue, you won't be able to edit the query unless you delete the referencing. What's the source of those queries?

Hope this helps


----------

