Forum Discussion
Program execution reached an invalid state
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
- avatorl4 years agoImpactful Individual
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...- avatorl4 years agoImpactful Individual
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.