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.
Hi Anonymous,
So the answer is No you cannot manually set a default query to open in the Power Query Editor
When you click Transform Data the Power Query Editor opens and automatically selects the query based on a simple rule (It selects the first query in the list in alphabetical (A to Z) order)
But your approach is correct but you might need to refine it:
- Use a Consistent Numbering System: Prefix your most important or master query with 00- or 01-
- Sometimes a query you dont see (like an old one that is now hidden) might still be first alphabetically
- In the Power Query Editor, go to the View tab
- Check the box for Show Hidden Queries
- After renaming make sure to Close & Load your workbook (or at least the Power Query Editor) and then reopen it by clicking Transform Data again (The new alphabetical order should take effect)
But here is a Simple trick you could Do If you dont want to rename your queries: (Advanced Editor)
- Open the Power Query Editor (it will open to the first query alphabetically)
- Simply double-click on the query you actually want to work on from the Queries pane on the left
That doesn't work.