Ravindra BagaleCourses & study guides मराठी Track your progress

6. Power Query Essentials

6.7 Query Dependencies

Start with a problem

Shahrukh wants to delete a query called Raw_Pune that seems unused. Two other queries would break.

Explain simply

View › Query Dependencies draws a map: sources, then queries, then loaded tables. Check it before deleting or renaming.

Show the data

Query Depends on Loaded to model?
Raw_Pune pq_raw_pune_export.csv No (Enable load off)
Orders Raw_Pune Yes
Stores Orders Yes

About this data: This table uses columns: Query, Depends on, Loaded to model?. This table uses columns: Box, Arrow to. This table uses columns: Wrong result, Reason, Correction. Values shown are the lesson examples already on this page (not a new dataset).

Fictional sample data. Practice file: pq_raw_pune_export.csv (source: src/practice/).

Demonstrate

  1. Rename the 6.1 query Raw_Pune; make Orders a Reference of it (cleaning steps in Orders).
  2. Right-click Raw_Pune › untick Enable load (name turns italic).
  3. View › Query Dependencies.

    Your result should look like this:

    Diagram
    CSV file, then Raw_Pune, then Orders, then Stores
  4. Click Raw_Pune in the diagram: Orders and Stores highlight.

Show the result

Your result should look like this (fictional sample):

Box Arrow to
pq_raw_pune_export.csv Raw_Pune
Raw_Pune Orders
Orders Stores

Explain what happened

The diagram shows every query that would fail if Raw_Pune were removed.

Explore further

  • Group queries: right-click › Move To Group › Staging, Dimensions, Facts.

Detailed reference for this lesson:

Large projects have many queries: source queries, staging queries, helper functions, parameters (बदलता येणारे मूल्य, जे अनेक ठिकाणी वापरता येते) and final tables. View › Query Dependencies shows a diagram of how they connect.

Steps in Power BI

  1. In the Power Query Editor click View › Query Dependencies.
  2. The diagram shows data sources (files, folders, databases) on the left, then queries, then the tables loaded to the model.
  3. Select a query to highlight everything it depends on and everything that depends on it.
  4. Use the layout options and zoom at the bottom of the window to read large diagrams.

Worked example. In our project, the diagram shows: Folder (Blinkit files) → Blinkit_Orders; AmazonNow_Orders.csv → AmazonNow_Orders; both → Orders (loaded); Products.xlsx → Product; and the parameter FolderPath feeding the folder source.

Organise the Queries pane: right-click a query › Move To Group › New Group… and create groups such as Parameters, Staging, Dimensions, Facts, Functions.

Tip

Queries shown in italics in the Queries pane have Enable load turned off – they run but are not loaded into the model.

Ravindra Bagale's Tip

Friends, many students delete a "staging" query that looks unused, and three other queries fail. Check View › Query Dependencies before deleting or renaming any query or parameter. It shows exactly which queries depend on it. This matters for both exams and interviews.

Fix common mistakes

Wrong result Reason Correction
Two queries fail after delete Did not check dependencies Check the diagram first
Raw_Pune appears in the model Enable load still on Untick Enable load
Diagram unreadable Many queries Use zoom and layout options

Practise independently

Practice task

If you delete Orders, which query also fails?

Hints
  • Who uses Orders?
Solution

Stores.

Think like a professional

Checking dependencies before changes is basic change management.

Ravi Sir's Cards for this lesson

मराठी cards