cancel
Showing results for 
Search instead for 
Did you mean: 

Error message " "The model doesn't have a named expression named <Query>" after clicking 'Apply'

After renaming a query and clicking Apply, I sometimes get the following error:

 

"Apply query changes

 

Divisions

The model doesn't have a named expression named <Query>."

 

I have the April 2019 Power BI Desktop installed, but have noticed this error for at least the last couple of months and on multiple computers.

Status: New
Comments
v-qiuyu-msft
Community Support

Hi @Anonymous, 

 

Are there more than one query in Query Editor? If it is, please enable the "Enable Load" for one query, click on Apply. If this query can be loaded successfully, then enable the "Enable Load" for the second query and click on Apply. Repeat the steps to check which query has the issue. 

 

q8.PNG

 

Best Regards,
Qiuyun Yu 

JohnKleb
Frequent Visitor

Okay, so now I know what Query is the problem, how do I fix?

Ramitos
Regular Visitor

Does anybody knows how to fix this?

anthonyloh
Frequent Visitor

I also ran into this issue today. 

jama1234
Frequent Visitor

I had the same error and I managed to solve it. I'm not sure if this solves it for you but I will share my case anyways as it might help you 🙂 

 

  1. Before I had created a query called "ABC", this query had active relationships to other queries
  2. While these relationships were still active, I went to the Edit Query Mode and deleted the query "ABC"
  3. I then created a new query "EFD" with some other content
  4. When applying the changes this error message came up
  5. I deleted all active relationships and went back to Edit Query Mode and renamed "EFD" into "ABC"
  6. Applying the changes worked then

I hope this works for you. 

 

Kind Regards, 

jama1234

andrewt
Advocate III

@jama1234's fix worked for me as well.

 

It seems changing the table names in the Query editor is the action that broke this. Once I delted relationship and then renamed my tables again back to the original names the load problem went away. 

Anonymous
Not applicable

My solution was rename the query in "Query Settings" on the right side of Query Editor, instead of rename query directly on the left side.

 

Hope this helps.

 

Capture.PNG

JoeRobert06
Helper II

I am having this same problem except the table it is referencing is a measure table and was never even included in the data model... not sure why this table is being flagged.

Roseventura
Responsive Resident

I too am having the same problem but I get this message when I try to open the PBIX.  I can't even get the PBIX to open without getting this error message.

 

How can I fix the issue if I can't even open the file? 

 

P.S.  I have an open ticket with Microsoft.

 

Rose

 

mo_jo_jo
Frequent Visitor

I also have this error message, which only affects multiple measure tables that I have in my model.

The error message has came out of nowhere for a file that updates on a monthly basis.

Something seems to have broken for measure tables, at least within the Power BI file. This affects even the backup copies of the file that I created. Frustrating. A 30min exercise update activity has turned into a wasted day. 

 

Fixes proposed above have not worked for my file.

If anyone has any suggestions, please share.