Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

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