Troubleshooting a Power BI Dataset Refresh Error

Troubleshooting a Power BI Dataset Refresh Error

I investigated a Power BI Dataset Refresh issue tonight that had been successfully refreshing until earlier in the day, when it began to fail consistently. The report solution is an extension of the Power BI Bing News Solution Template (which is really impressive!).

In the Power BI tenant, I navigated to the dataset properties to view the refresh history where I saw the following error message stating that "There was an error when processing the data in the dataset", followed by the additional details of "The command has been canceled".


Power BI Dataset Refresh Fails


The error message included a table name, but searching through the previous failure messages, the table name was not consistent, so this seemed to be a bit misleading. The message stating that the command had been canceled reminded me of the error in Power BI Desktop when an error is encountered while refreshing a report with multiple datasets. In that case, the refresh fails on the specific problematic data source, with the other sources showing the message below:


Power BI Refresh Fails


My next troubleshooting step was to open the report in Power BI Desktop and manually refresh the data sources, which ended up leading to the root cause of the problem. When I manually refreshed my report, I hit the following error message, which highlighted a constraint violation with the data that was being refreshed, in this case where an attempt to insert duplicate values were causing the violation.


Power BI Dataset Refresh Error


I manually cleaned up the duplicate entry in the database and the refresh started to succeed again. This one turned out to be a surprisingly quick investigation with Power BI Desktop providing a much more detailed message that led me to the issue. If you encounter a dataset refresh issue, try to refresh the report manually in Power BI Desktop for potentially more information to help troubleshoot.

Sam Lester (MSFT)

PS: Did anyone else notice that the two different error messages spell canceled/cancelled differently? "The command has been canceled." and "Load was cancelled by an error in loading a previous table."