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.
Alan_ , that makes sense. Any reason why we need to schedule the Power BI Dataset refresh in Power Automate rather than scheduling the refresh in the Power BI Service and then perform the Power Automate Refresh script? If you roughly know how long the refreshes take, then you can schedule the Dataset refreshes way early...and then run the refresh on the Excel files later.
Yes, you can do that. My preference is to run refreshes from Power Automate but your way will work fine.
Interestingly I have converted a few Datasets and they seem to refresh much quicker.
- Alan_2 years agoAdvocate II
Yeah, I have both options to add a pivot or a table. One thing with a table the query defaults the table column names to dataset+column. I did edit the DAX to remove the dataset name, so that's an option..
- Alan_2 years agoAdvocate II
It's Excel. Steps are:
1. Data tab
2. Get Data dropdown
3. From Power Platform
4. From Power BI
5. Side pane opens where I can search for a dataset
Could be you may need to update Excel?I'm running 365 version 2309
- Anonymous2 years agoNot applicable
Alan_ , thats great! I'm wondering if its because of the conversion to the newer Data Model style that is more optimized than the one in Excel.
Another thing to note on the rebuilding of the reports...The Power BI Data Set in Excel seems to require everything to be a Pivot table. Anyway to also output to a standard Table Ouput? I know I could probably just build it "like" a table in the pivot view....but just a question. - Anonymous2 years agoNot applicable
Alan_ , That looks like its from Power BI Desktop. I'm talking about from Excel itself. Mine looks like this when I'm rebuilding a report and choosing the Power BI Dataset:
When you click on it, a Pivot Table is automatically created.
- Anonymous2 years agoNot applicable
Alan_ , that might be it. I'm on 2303. I'll update and check again.
- Alan_2 years agoAdvocate II
There's an issue with this method - Excel needs to be able to connect to the data if using pivots so it is limited.. One to be aware of.