Forum Discussion
Limit query refresh when working with Folder data source that are large?
Hi,
Since I am working from home and am using a VPN. The file refresh for queries are slow.
This means that creating a PowerBI report is time consuming as I have to wait 30 minutes for the query to refresh when working on a report with the folder data set.
I have moved 95% of the files, in another folder so the refresh time is a lot less when I "Transform data".
Is there a better way to manage this?
I know not worried about missing the data as I am not analyzing any information right now, and just building the report.
Thank you
Hi PBIUWO ,
There's two stages of data transfer that affect the speed of your refresh:
1) acquiring the data from source - this is what will be affected by network speed (e.g. VPN) unless you are using local files, and can be improved to some degree by reducing the data at source.
2) passing the data from Power Query to the data model - this will be affected by your workstation CPU and RAM, and can be improved as follows:
In order to limit the amount of data that gets applied to the data model for development, you can use a query toggle to change which step each query represents before being applied.
- Start by creating a new blank query called 'dbIsFiltered' or similar. Just apply a value of 1 to this query.
- Then, on each of your existing queries, apply the filter or limit to the data that you want to use when in 'development mode'. This may be filtering the table to only include data from yesterday, or applying the 'Keep Top N Rows' function. Do this as the LAST step on each of your queries that you want to reduce in size.
- Then, either add a custom step using the formula bar or edit the M code directly to add a new LAST step that basically reads "if dbIsFiltered = 1, then use the filtered step, otherwise use the unfiltered step".
Here's roughly how that would look in your code:
let Source = youDataSource, yourSteps = yourTranformationSteps, ... ... originalLastStep = The last, unfiltered step of your original query, filterStep = Data reduction step(s) e.g. date filters or TOP N rows, dbToggle = if dbIsFiltered = 1 then filterStep else originalLastStep in dbToggleWhat this allows you to do is control the output of all of your queries just by changing the value held in your dbIsFiltered query i.e. when the value is 1, all of your queries use a filtered output step, otherwise they use the original, unfiltered output step.
Hope this makes sense.
Pete
- Anonymous5 years ago
Hi PBIUWO
Large size of data source ,complex power query, your network (if your data source is not in local computer) will impact the performance of power bi.
Here are some blogs to optmize your power bi performance.
Blog1: power query refresh really slow- excel file
Blog2: Optimization guide for Power BI
Blog3:Power BI Performance Optimization Tips
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 Replies
- BA_PeteSuper User
Hi PBIUWO ,
Based on your description, I presume you are connecting to a folder full of Excel files or similar.
As your issue is in data transfer over the network, my recommendation would be to duplicate your source folder, then, in each of the excel files that your report uses, delete all but 50 or so rows.
Point your report at this new folder during development, then point it back to the full data source folder before moving to production environment.
If your issue were in the time it takes to apply from Power Query to the data model, then you can use a DBFilter toggle query to manage this, but this doesn't sound like where your time is being spent.
Pete
- PBIUWOHelper III
- BA_PeteSuper User
Hi PBIUWO ,
There's two stages of data transfer that affect the speed of your refresh:
1) acquiring the data from source - this is what will be affected by network speed (e.g. VPN) unless you are using local files, and can be improved to some degree by reducing the data at source.
2) passing the data from Power Query to the data model - this will be affected by your workstation CPU and RAM, and can be improved as follows:
In order to limit the amount of data that gets applied to the data model for development, you can use a query toggle to change which step each query represents before being applied.
- Start by creating a new blank query called 'dbIsFiltered' or similar. Just apply a value of 1 to this query.
- Then, on each of your existing queries, apply the filter or limit to the data that you want to use when in 'development mode'. This may be filtering the table to only include data from yesterday, or applying the 'Keep Top N Rows' function. Do this as the LAST step on each of your queries that you want to reduce in size.
- Then, either add a custom step using the formula bar or edit the M code directly to add a new LAST step that basically reads "if dbIsFiltered = 1, then use the filtered step, otherwise use the unfiltered step".
Here's roughly how that would look in your code:
let Source = youDataSource, yourSteps = yourTranformationSteps, ... ... originalLastStep = The last, unfiltered step of your original query, filterStep = Data reduction step(s) e.g. date filters or TOP N rows, dbToggle = if dbIsFiltered = 1 then filterStep else originalLastStep in dbToggleWhat this allows you to do is control the output of all of your queries just by changing the value held in your dbIsFiltered query i.e. when the value is 1, all of your queries use a filtered output step, otherwise they use the original, unfiltered output step.
Hope this makes sense.
Pete
- AnonymousNot applicable
Hi PBIUWO
Large size of data source ,complex power query, your network (if your data source is not in local computer) will impact the performance of power bi.
Here are some blogs to optmize your power bi performance.
Blog1: power query refresh really slow- excel file
Blog2: Optimization guide for Power BI
Blog3:Power BI Performance Optimization Tips
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
Hi PBIUWO
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your problem.
Best Regards,
Rico Zhou