Forum Discussion
Power Query - Excel - remove data before saving workbook
Hi, all!
Happy New Year. Thanks to everyone who has kindly supported me all these months!
One more question:
I am looking to dump data before saving a file so that I can reduce its file size.
Under query properties, I see a remove data from external data range before saving the workbook, but it is grayed out, even if I have its dependant box ticked.
How can I achieve that? keeping queries, but no data so file size is smaller; then, upon opening file, either loading data automatically or having the user option for "refresh".
Thanks!
Hello Anonymous
what you could try is something like this
- create boolean parameter- in the last steps of all your queries add a new step with an if-statement. in case the boolean is true hand over your real data, if its's false then only a empty table without any data, but with the correct columns
in this way you would be able to change the parameter and to empty your complete data model
What do think about it?
Jimmy
5 Replies
- Jimmy801Community Champion
Hello Anonymous
a query itself needs no diskspace whatsoever. Diskspace is only needed to store the output data of an query. Normaly you get rid of all data before storing it anyway. So I don't know what could be the right approach to reduce diskspace in your case. I would consider storing all output data in power pivot, as this has a different data storing concept, and it take muuuuch lesser diskspace.
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy- AnonymousNot applicable
Hi, Jimmy801 - Thanks for the reply.
I have several queries in the datamodel, and it seems like that is why the query data is being stored in the local file.
In other Excel apps, what I have done is to query one item and save it, but this is not the case for the one I am working on.
I was looking for a way to dump/clean datamodel data so that file is just "virgin";
let me know any thoughts. Thanks!
- Jimmy801Community Champion
Hello Anonymous
what you could try is something like this
- create boolean parameter- in the last steps of all your queries add a new step with an if-statement. in case the boolean is true hand over your real data, if its's false then only a empty table without any data, but with the correct columns
in this way you would be able to change the parameter and to empty your complete data model
What do think about it?
Jimmy