Forum Discussion
Power Query Editor cannot be used
In Power BI Desktop, I used the external tool Tabular Editor to create partitions, and then my Power Query became inaccessible, and all queries have disappeared. It goes wrong when i click apply. The window popped up with the following content.
Has anyone encountered a similar issue?
hi ChenwuZhu_Gmail ,
it was suggested like:
The "Collection was modified; enumeration operation may not execute" error on apply typically stems from conflicts between Tabular Editor’s schema changes and Power BI’s internal data model state. Below is a structured, step-by-step solution to recover your queries, fix the error, and prevent recurrence, tailored to your scenario:Step 1: Immediate Recovery (Retrieve Disappeared Power Query Queries)The queries are not permanently deleted—they’re hidden due to a schema mismatch between Tabular Editor and Power BI. Follow these steps to restore them first:Option A: Restore from Auto-Recovery (Fastest)
Power BI Desktop auto-saves recovery files. Here’s how to access them:- Close Power BI Desktop completely (ensure no background processes are running via Task Manager).
- Navigate to the auto-recovery folder (Windows):plaintext
%LocalAppData%\Microsoft\Power BI Desktop\AutoRecovery
- Look for .pbix files with timestamps matching before you used Tabular Editor. Open the most recent one—your queries should be intact here.
5 Replies
- FreemanZSuper User
hi ChenwuZhu_Gmail ,
it was suggested like:
The "Collection was modified; enumeration operation may not execute" error on apply typically stems from conflicts between Tabular Editor’s schema changes and Power BI’s internal data model state. Below is a structured, step-by-step solution to recover your queries, fix the error, and prevent recurrence, tailored to your scenario:Step 1: Immediate Recovery (Retrieve Disappeared Power Query Queries)The queries are not permanently deleted—they’re hidden due to a schema mismatch between Tabular Editor and Power BI. Follow these steps to restore them first:Option A: Restore from Auto-Recovery (Fastest)
Power BI Desktop auto-saves recovery files. Here’s how to access them:- Close Power BI Desktop completely (ensure no background processes are running via Task Manager).
- Navigate to the auto-recovery folder (Windows):plaintext
%LocalAppData%\Microsoft\Power BI Desktop\AutoRecovery
- Look for .pbix files with timestamps matching before you used Tabular Editor. Open the most recent one—your queries should be intact here.
- MattiaFratelloSuper User
Hi ChenwuZhu_Gmail,
it seems like a knows issue. Try to look at this solution from previous questions: https://community.fabric.microsoft.com/t5/Desktop/Tabular-Editor-model-changes-not-updaint-in-Power-BI-Desktop/m-p/3152757/highlight/true#M1065155
If this helped, please mark as Answer and give kudos 👍 - cengizhanarslanSuper User
This usually happens when partitions created/edited via Tabular Editor leave the model in a state that Desktop’s Power Query layer (the “M queries”) can’t reconcile. Then, when you hit Apply changes, Desktop tries to enumerate/refresh the query collection and throws.
1) Open the PBIX and undo partition changes
If you can still open the file:
Go to External Tools → Tabular Editor
Find the tables you partitioned
Set them back to a single partition (default), or remove the added partitions
Save back to PBIX
Re-open Desktop and try Transform data again
2) If Power Query UI is already broken: recover via a “clean copy”
A reliable workaround is to rebuild the mashup without losing the model:
Create a new PBIX
Copy your Power Query (M) from the old file if you can access it (sometimes you can via Advanced Editor / or from the PBIX contents)
Then re-apply model changes carefully
- AnonymousNot applicable
Hi ChenwuZhu_Gmail ,
Thank you for reaching out to the Microsoft Fabric Community Forum.
Could you please let us know if the issue has been resolved? I wanted to check if you had the opportunity to review the information provided. If you still require support, please let us know, we are happy to assist you. Thank you for all the members who have already provided helpful responses.
Thank you.
- AnonymousNot applicable
Hi ChenwuZhu_Gmail ,
We haven’t received an update from you in some time. Could you please let us know if the issue has been resolved?
If you still require support, please let us know, we are happy to assist you.Thank you.