Forum Discussion
Default query when opening Power Query?
- 8 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.
- 8 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.
I believe I tried that (screenshot below), no change in behavior.
Hi Anonymous , Thank you for reaching out to the Microsoft Community Forum.
Create a true standalone landing query at the very top that has no references (Home -> Transform data -> New Source -> Blank Query, set the formula to = "Start here"), name it Landing and make sure it isn’t a reference of any other query. Drag that Landing query to the top, save the PBIX, close Power BI completely and then reopen. Because it has no dependencies, Power Query will not auto expand it and the editor will open there.
If you can’t add a standalone query for design reasons, move the entire dependent Sales history group below the Landing group (drag the group down so it’s not the first expanded block), save and close, then reopen.
- Anonymous8 months agoNot applicable
Didn't work, same behavior as prior. Upon opening PQ it went straight to Hormel and started the preview process.
- v-hashadapu8 months agoCommunity Support
Hi Anonymous , Thank you for reaching out to the Microsoft Community Forum.
Right click your Sales history -> Duplicate (not Reference). Move that duplicated query into the top Landing group, rename it, confirm its formula is self contained (a true independent query) and optionally turn off its load if you don’t want it in the model. Save, close Power BI completely, then reopen, Power Query should land on that independent duplicate because it isn’t part of the dependent chain that auto expands.
If that still doesn’t work, paste the duplicated query’s Advanced Editor code here as plain text and a tiny sample table along with relevant details. So, I can check for any remaining references and repro it to see it succeds.
- Anonymous8 months agoNot applicable
Would having query merges cause this behavior in PowerQuery?
- v-hashadapu8 months agoCommunity Support
Hi Anonymous , Thank you for reaching out to the Microsoft Community Forum.
Yes, merges, appends or any step that references another query make that query part of a dependency chain and Power Query auto expands dependency chains on file open. That auto expand is what forces the editor to land on the first child even if you put a Landing item above it. So, the landing item must be completely independent, no Table.NestedJoin, no Table.Combine, no steps that use another query name and no references.