I'm having this error when I try to refresh the data.
Does anyone have any ideas to solve this issue?
Any help would be much appreciated.
Thanks in advance!
Remove the part of your query that sets the specific fields as date or datetime (you can leave all other Change Type parameters in though) and see if that fixes it. Power BI might already be reading the field in as a date from your source data (i.e. SQL Database), so that extra step is unnecessary now. This fixed the problem for me. I removed it and could see that the field was already being read as date type.
Same problem in France, hope it will be fixed soon !
Indeed I also came to the same conclusion : the error appears when trying to change the type of a column to date/time. With a SQL datasource.
Have a good day
I received the same error message this morning when I issued a refresh command on the Power BI Desktop. The refresh was working fine last Satruday 21 Apr 2022. Is the Power BI Team able to find the reason and fix the probelm ?
As @bwind said, it appears to be a recent problem with "change type" in Power Query. Just deleted one step and everything is working now.
I am also getting this issue:
Refreshing works in my online workspace, but refreshing on Desktop throws the invalid state error.
I have narrowed it down to a single step: changing the type of a column which represents a timestamp from "Any" to datetime.
This appears to occur for every instance where I try to convert "Any" to datetime. It does not appear to be related to the input data, as applying a filter to only show older data (which worked at the time) yields the same error.
This appears to have become an issue sometime in the last couple weeks. This is an old pbix file which used to work, and I have not modified recently...
I am seeing this error as well, but for me it is when we are trying to refresh MySQL dataflows via the online web portal. Our gateway can connect to the MySQL server just fine, and editing the dataflow can actually bring up a proper preview, but after precisely 31 seconds, every dataflow refresh stops and throws up the above-mentioned error.
"Error: Program execution reached an invalid state. The execution should have never reached this code. Request ID: 64066e82-2220-c5e0-6ffe-0d84801e5ff5 Activity ID: b4b457d6-6c66-422e-981a-acda66d89156"
Same issue on our side...never had trouble before...now getting "Program execution reached an invalid state. The execution should have never reached this code."
Refresh is from a MySQL database hosted on AWS.
Online refresh still working...just not working in PBI Desktop.
Tested on different datasets (eg. ODBC to local database) and it worked fine. Others that are having these issues...
A) Is it just on desktop or in the service?
B) What are your data sources?
I'm also currently experiencing the same in a dataset that did not have any refresh issues before. If anyone has a solution on how to solve this kindly share..
Any help will be greatly appreciated!
@Milan14 , I doubt seeing this error. Please try again after some time. If you have done some changes. try to revert that and try.
Also log and issue - https://community.powerbi.com/t5/Issues/idb-p/Issues
Did anyone solved the problem?
@Cary_Carr Did you find a solution?
I'm getting the same error message when trying to refresh a dataflow connected to MySQL database.
Seems to be working well with a simple query of a small MySQL table, but fails on more complicated data transformations...
After some testing I can confirm that the problem seems to be related to date columns. But it happens not only on a Change Type step. I have no Change Type steps in my queries that cause dataflow refresh to fail, but I have Merge and Expand Columns steps. And it fails with "Program execution reached an invalid state" error if in Expand Columns step there is a date column.
As a workaround I'm changing column type to Integer before merging a table that contains date column with the main table. And then after Expand Columns step I'm using Change Type to change Integer back to Date. It solves the problem discussed in this topic, but it ruins Query Folding and makes dataflow refresh slower and as a result one of my queries still fails to refresh but this time with "Fatal error encountered during data read". A smaller query now works well with no "Program execution reached an invalid state" error...
I'm not sure if it's a bug in Power BI / Power Query, data gateway or MySQL connector, but my dataflows worked well until we replaced the gateway machine and reinstalled data gateway and MySQL connector. Maybe software update just triggered the problem not directly related to this software. By the way, the most recent version (8.0.29) of MySQL NET connector has another bug and doesn't work with Power BI, we're using a previous version.
Click here to learn more about the August 2022 updates!
Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.