Forum Discussion

Pmorg-73's avatar
Pmorg-73
Helper I
1 year ago
Solved

How to solve Query Parameter error?

Hi

 

I have not had this message before. And it is not very helpful tbh.

 

I had started to get refresh errors on a scheduled refresh and Ifind one of my queries would not refresh in the desktop. But if I right click and refresh that specific table it refreshes. I could then hit refresh and the whole model would refresh. I have about 10 tables in my data model.

 

Yesterday I started to get this

 

It does not tell me which power query paramet to look at, so is there any way to debug this?

 

 

  • Hi Pmorg-73 ,

     

    It is telling you which parameter to look at: Parameter12.

    In Power Query, go to the Home tab > Manage Parameters and all your parameters should be listed here:

     

    It looks like you have a parameter that, for whatever reason, isn't getting populated before you're trying to refresh. It may be the result of another query that isn't refreshing in time before the main query requires it, but difficult to say from here, I'm afraid.

     

    Pete

7 Replies

  • ahaaaaa.  So.........  It was a parameter being used for a table I had recently deleted as I no longer need it. Must remember from now on to delete the qery it leaves behind. I assume it was looking for a table in my sharepoint folder that I had then deleted as well. Thanks for the help guys

    • BA_Pete's avatar
      BA_Pete
      Super User

       

      No problem, happy to help.
      Don't forget to give a thumbs-up on any posts that have helped you β€Œβ€ŒπŸ‘

       

      Pete

  • Hi Pmorg-73 ,

     

    It is telling you which parameter to look at: Parameter12.

    In Power Query, go to the Home tab > Manage Parameters and all your parameters should be listed here:

     

    It looks like you have a parameter that, for whatever reason, isn't getting populated before you're trying to refresh. It may be the result of another query that isn't refreshing in time before the main query requires it, but difficult to say from here, I'm afraid.

     

    Pete

  • v-veshwara-msft's avatar
    v-veshwara-msft
    Community Support

    Hi Pmorg-73 ,

    Thanks for posting in the Microsoft Fabric Community.

    As already shared by BA_Pete , the error is pointing to Parameter12, which likely isn't returning a value at the time it's being used during refresh. In many cases, this happens when a parameter relies on a query that hasn't loaded or has returned an empty result.

     

    From similar reports, this error can also occur if a query is operating on an empty list or table, especially during transformations like pivot or list functions. Another possible cause is duplicate column names while pivoting, which can lead to structure issues during refresh.

     

    It’s best to check in Power Query which query is dependent on Parameter12, and then step through the applied steps to see where it breaks. Also ensure that any related query loads successfully before the parameter is used.

     

    Here are some similar cases:

    Solved: Parameter Error There weren't enough elements in t... - Microsoft Fabric Community
    Solved: Expression Error : There weren't enough elements i... - Microsoft Fabric Community

    Solved: Expression.Error: There weren't enough elements in... - Microsoft Fabric Community

     

    Hope this helps. Please reach out for further assistance.

    Thank you.

     

     

  • Only solution to refresh is to right click each table and refresh them there. 1 by 1, which is laborious

  • Thanks guys

     

    I had not seen away to find where "parameter 12" was. I had named all my queries so I was at a loss how to find it. (30 odd I think). But using the tips here I have located the one that is failing so will try to debug it. I may have spotted the parameter number changing when it fails. Will see if I can repair it