Forum Discussion
Excel Datamodel scheduled refresh
- Anonymous2 years ago
Alan_ , so I'm not sure what the issue is, but the Power Automate task is failing on the refresh. It worked when I tested it, but on the schedule for the last 2 weeks, it has been failing:
{ "error": { "code": 504, "source": "flow-apim-msmanaged-na-northcentralus-01.azure-apim.net", "clientRequestId": "****" "message": "BadGateway", "innerError": { "status": 504, "message": "Request to Graph API has timed out.\r\nclientRequestId: ****", "error": { "message": "Request to Graph API has timed out." }, "source": "excelonline-ncus.azconn-ncus-001.p.azurewebsites.net"The Service Refresh is working fine. The Power Automate task runs after about an hour after the service refreshes the Dataset. The flow has 2 retries.
** UPDATE ** Turns out the refresh Office script is timing out due to it taking longer than the 2 minutes limit that Power Automate has for Office scripts. Changing the Timeout duration on the Run Script step does not fix this.
So knowing this, this "solution" is no longer the solution we thought it was. We need another way to do this.
** UPDATE 2 **
Turns out that I got the Power Automate to finally work! It takes about an hour and a few retries, but it finally refreshed successfully. I had to set Fixed Intervals on the Run Script Action Step, but that seemed to work. Will have to monitor the flow's performance next week. I upped the Count to 20. On the sucessful run it retried 5 times.
ibarrau , thank you for the suggestions. All of our Excel files are stored on Sharepoint. The method you describe makes sense if you are creating New Excel workbooks for publishing.
What do we do with reports that already exist and built (that were already refreshing before on the service)?
Do we have to rebuild the Workbooks in the new way and publish the DataSet to the Service?
When you said:
If you have workbooks at a Power Bi Workspace, I would recommend creating a Power Bi Dataset with a table view (if you want to keep that visual).
I hope that make sense
Would you mind elaborating on that?
Considering they are deprecating the way of viewing excel models in a Power Bi Workspace without using PowerBi Desktop, I would totally rebuilt them using desktop and publish. If the deprecation is not now it will be at some point in a future. It's always good to update the technology you are using.
Regarding my comment I meant if your workbooks items are inside workspaces like this:
then rebuild. Create a new power bi desktop and get data from that workbook.
Regards,
- Anonymous2 years agoNot applicable
ibarrau , got it. I tried the experiment this morning. I imported all of the queries and data model from a report, then published it to the Power BI Service as a Dataset.
I then opened up the Excel file and pulled in that Dataset, recreated the pivot and saved it.
I then did a manual refresh on the Dataset in Power BI Workspace. From what I read it can take about an hour to sync the changes to sharepoint/onedrive.
Its now been over an hour and I don't see the file on Sharepoint with a new date/time stamp so the refresh of the file hasn't happened.
The Power BI Service shows the refresh was successful. Do I have to manually refresh the workbook? I thought the refresh would push back to the file attached to the Dataset from the Power Bi Service?- ibarrau2 years agoSuper User
Importing excel data in a Power Bi Dataset means you have asyncronic data refreshes. You can configure schedule refresh to let the tool run up to 8 refreshes a day (with regular user licences) or 48 times with premium.
Make sure you are connecting this way
https://www.youtube.com/watch?v=t4TzHu8THoA
That way you don't need a gateway. Open Power Bi Service. Check the dataset settings and edit credentials in there. You can schedule refresh after that.
If you were already doing all that, make sure you click "refresh visuals" or the whole browser just in case you had some cache in there.
Regards
- Anonymous2 years agoNot applicable
ibarrau , thank you for the help. I think you are assuming we are using the Power BI Service to publish our workbooks to our Workspaces in order for us to refresh the Dashboards out there.
We do that on some of our reports, but the scenario I am talking about it specifically uploading the data model of the Excel Workbook to the workspace so that the Power BI Service can autorefresh/schedule refresh the Datamodel and in essense the Excel Workbook. That is it.
We use this because how limited we are on the datasources and licenses we have available to us. We also have limited IT support for a lot of our Microsoft Platforms.This automated / scheduled refresh allows us to free up time that would be otherwise spent opening up Excel Workbook Reports individually and having to remember to manually refresh them on a daily/weekly cadense.
If this is going away, what do you recommend we do to perform the same tasks as the Power BI Service was doing for us all this time to automatically refreshing these Excel Workbooks?Most of the Datasources we are using are from Sharepoint Document libraries and Sharepoint Lists.
We have a very few sources from a SQL database (which uses a gateway).