I have the problem also. "Sample File Parameter2 (2)" is supposedly referencing a query that I didn't created, but there is no such parameter and not one single shred of Power Query code references the query or the parameter.
The problem is the result of using some of the transformations available on the toolbar to filter the data. These transformations created multiple folders of queries, some of which could be deleted, and some of which can't. It is absolutely a bug somewhere in Power BI.
well found the issue but don't know how to fix it. 😞
Backup your pbix first (very important).
either rename the file from <name>.pbix -> <name>.zip or use a 3rd party filemanager tha can open zip files by content.
The file you want is called datamashup
this seems to be a part binary/part xml file listing items in the data model.
I found all the incorrect references listed in here. Although deleting them from the xml and importing the Datamashup back into the pbix file resulted in a corrupted file (as expected). Hence the backup requirement at step 1 🙂
If anyone can work out how to edit the file cleanly. We may have a solution to this....