Forum Discussion
PowerQuery: only refresh if parameter is set to True, otherwise don't refresh
Hey guys & gals,
I'm getting into M a little bit to make some things possible that otherwise wouldnt be, but I definitely don't have enough knowledge to fix the following issue:
We have some queries that are very hard on our database. These queries however, yield the same result every time they run, because it concerns historical data. So it would be nice if PowerBI only refreshed these tables once, and then never again.
My solution was to create a parameter called "LoadHistoricalData" and set it to 1 or 0. So what I want is that when I set it to 0, that the data in the table remains the way it is, and no queries are sent to the DB. If it is set to 1, new data is pulled from the database.
Is there any way to do this? Can you help steer me in the right direction?
Thanks!
Jaap
4 Replies
- Greg_DecklerCommunity Champion
- ImkeFCommunity Champion
Looks like dataflows can come to the resuce here: http://excel-inside.pro/blog/2019/03/21/classical-incremental-refresh-for-cloud-data-sources-in-power-bi-service-for-pro-accounts/
or this: http://excel-inside.pro/blog/2019/03/21/video-semi-incremental-refresh-for-pro-accounts-in-power-bi/
- AnonymousNot applicable
Thanks for the suggestions! The dataflows suggestion would work, but the problem is that it would be more complex to create and maintain than my current solution (Run the query on our database, copy the results to an "enter data" table in powerBI). I was hoping to eradicate the manual steps. Because we serve many different clients, we would need to create a dataflow for each of them, hurting the maintainability of the data flows, which, as far as I can tell, I cannot copy between workspaces.
But thanks a lot for thinking along though! Guess I'm still waiting for the day Power BI service actually listens to the "include in report refresh" tick :(