Forum Discussion
Refresh Power BI datasets in certain workspaces using Powershell and API
why are you refreshing these datasets in the first place? Ideally they should only refresh when the source data has changed. What SKU are you running on?
- jayjay16 years agoFrequent Visitor
The datasets are using Azure SQL databases but due to the Dynamic Row Level Security I applied so users and teams can access their own data I had to switch from Direct Query to Import mode. Which is why I need the dataset refresh automated rather than manually setting up the schedule on each dataset as there are far too many to go through.
- lbendlin6 years agoSuper User
Put the workspace and dataset IDs in a SharePoint list and create a flow in Power Automate to issue the refresh requests. Be mindful of your SKU's limit on concurrent renderers.
Since you are already using dynamic RLS can you not point all your workspaces to a shared dataset?
- jayjay16 years agoFrequent Visitor
It's a good suggestion thanks but it would mean spending a lot more time to configure PowerApps when I have already spent a large amount of time trying to get the above code to work and it really only needs adding/adjusting one or two lines of code. I'm thinking I may need to post this on a Powershell forum as clearly not many Powershell experts are on here.
I decided against a large master dataset as reports and refreshes can end up being inordinately slow and it can become a lot harder to keep track of what is being used by what or overcomplicated or why a particular count/set of counts or figures are showing what they are, etc you get the picture (I hope).