Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Short version: I edited a parameter in the advanced editor to see if I could turn it into an integer parameter, which produced an error. Despite that error, the change was saved, leading to repetitive error messages. I tried to restart PBI / Power Query to see if that would fix the error, but ended up unable to open it or edit my parameters at all.
Is there a way to edit queries without opening Power Query and fix that error?
Context:
When replacing null values in an integer foreign key with 0, the column is forcibly converted to a decimal number instead. As "Replace Value" allows parameters, I wanted to try if an integer parameter would avoid that behaviour.
Reproduction:
I created a parameter, saw that there was no integer selection and figured I would simply try if I could manually edit it. In retrospect, I should've performed that experiment in a separate file, but at the time I expected I'd just get a query error and have to undo the change. The resulting code looked like this:
1 meta [IsParameterQuery=true, Type="Int64", IsParameterQueryRequired=true]
Instead, I received a pop-up error message "'Int64' is not supported in this method" upon clicking "Done". Expecting that it would undo the change, I clicked "Cancel", confirmed that I wanted to discard my changes. Upon editing a different parameter, that message popped up again. I assumed that it was a lingering error message, as I expected that change to have been discarded, and decided to restart Power BI to see if that would clear the error.
Upon reopening the file and trying to open the editor, I received that error again. Power Query failed to open, so that I could not even have corrected the error. Editing the parameters to reset the type there produced the same result.
In a later reproduction, I was able to verify that I could have deleted the parameter or reopened the advanced editor to change the type there, despite the error messages, if I had kept Power Query open instead of trying to restart it.
Copying the details to clipboard allowed me to at least salvage the code of the queries I had been building, but I couldn't paste them into a different file to simply restore them that way. As I understand it, there also is no way to bulk-import queries from text. Tabular Editor can't edit pbix files, and exporting it to a template would require applying my (at that point faulty) changes.
Short of manually copy-pasting each query name and code into a new blank query, is there a more convenient way to simply delete that parameter without opening Power Query?
I've accepted that losing half a day's work is a lesson in saving more often and performing experiments in separate files, but if there's a way to recover it (and possibly deal with future issues), I'd obviously be grateful.
To reproduce the issue:
Hi There, I know this is an old post, but I happened upon it when I made a similar mistake in Excel. I got locked out of PQ editor when trying to adapt a VBA function that updates PQ text parameters, to work with a date parameter. The script wrote a date value into a 'Type = ' parameter in the query string, and I got the 'Frown' error message whenever I opened the file, or tried to edit a query.
Because I caused the problem with VBA, I was able to resolve it by running the same script, but replacing the date value with a valid 'Type =' parameter value. I can see you were using pBI so VBA wouldn't have been an option for you, but wanted to share. Not sure if there is another scripting language or approach that can get at a parameter query string in a pbix file.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
12 | |
8 | |
8 | |
7 |
User | Count |
---|---|
15 | |
13 | |
7 | |
6 | |
5 |