Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 months ago
Solved

Default query when opening Power Query?

Hi - is there a way to specific which query opens when you select Transform Data from the menu  bar? I've tried changing it and saving, renaming it to "01-queryname" and I can't get it to work.    ...
  • v-hashadapu's avatar
    v-hashadapu
    7 months ago

    Hi Anonymous , Thank you for reaching out to the Microsoft Community Forum.

     

    The file is auto opening on Hormel because your target query is part of an active dependency chain (you show Source = Table.Combine({Hormel, #"Not Hormel"}) and several Table.NestedJoin steps).

     

    Make a truly independent landing query. Either create a topmost Landing query with no references or duplicate the Sales history query and inline the actual source steps from Hormel and Not Hormel into the duplicate (rename those local blocks and set Source = Table.Combine({Source_Hormel, Source_NotHormel})) so the duplicate has no incoming arrows in View -> Query Dependencies. Save the PBIX, fully close Power BI and reopen, the editor will then open to that independent query.

  • IrinaTokm's avatar
    7 months ago

    Hi,
    As far as I know, there is no way to set a default query for Transform data.
    In your case Sales history depends on Hormel and Not Hormel, so Power Query opens the first query in that chain (Hormel).
    A simple workaround is to create a new query that just references Sales history and move it to the top of the Queries list, or right-click Sales history in the Fields pane and choose Edit query to open it directly.