Forum Discussion

ronrsnfld's avatar
ronrsnfld
Super User
2 years ago
Solved

Query string reference problem

Based on other topics, I can refer to queries using strings. And the query works as desired in the Power Query UI. However, when I try to "Close and Apply", I receive an error message     I...
  • BA_Pete's avatar
    2 years ago

    Hi ronrsnfld ,

     

    As far as I'm aware, the intrinsic variables (#sections, #shared) can only be used within PQ when using PBI Desktop and not passed to the model. My assumption is, because they are environmental keywords i.e. they give information about the current environment, and the data model can't give that environmental info, this is what breaks it.

    Why it seems to work in PQ for Excel I have no idea.

     

    You could possibly try @'ing Ehren into this thread if you need the technicals on it.

     

    Pete

  • Ehren's avatar
    Ehren
    2 years ago

    For perf reasons, in PBIDesktop refresh, we trim any queries that aren't being referenced (directly or indirectly) from the mashup document and replace them with a null value. References by name via #sections or #shared don't count, so they get turned into null.