Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

2.6 Understanding Query Dependencies

Lesson 16 of 62 in the free Power BI notes on Siksha Sarovar, written by Rohit Jangra.

Understanding Query Dependencies

Query dependencies show how your queries (tables) relate to and depend on each other within Power Query. Understanding dependencies helps you manage complex data models and troubleshoot issues.

What are Query Dependencies?

• A visual map showing how queries are connected • Shows which queries feed into other queries • Helps identify the order in which queries are processed • Essential for debugging and optimization

Viewing Query Dependencies

Steps:

  1. In Power Query Editor, go to the View tab
  2. Click Query Dependencies
  3. A diagram opens showing all queries and their connections

Types of Dependencies

TypeDescription
Source DependencyQuery depends on an external data source (file, database, API)
Query ReferenceOne query references another query's output
Merge DependencyQuery merges data from another query
Append DependencyQuery appends data from another query

Staging Queries (Best Practice)

A staging query is a query that loads raw data but is not loaded into the data model. Other queries reference it for transformations.

Benefits of Staging Queries: • Reduces data source calls (source is queried once) • Improves performance and maintainability • Allows multiple queries to reuse the same source data • Makes the data pipeline cleaner and easier to debug

How to Create a Staging Query:

  1. Create a query that connects to the data source
  2. Right-click the query in the Queries pane
  3. Uncheck Enable Load (data won't load into the model)
  4. Other queries can reference this staging query

Query Folding

Query folding is when Power Query translates its transformation steps into native queries (e.g., SQL) that run on the data source server.

Why It Matters: • Dramatically improves performance • Processing happens on the server, not in Power BI • Reduces data transferred over the network

How to Check Query Folding:

  1. Right-click on a step in Applied Steps
  2. If "View Native Query" is available and not greyed out, folding is happening
  3. If greyed out, folding has broken at that step

Steps That Break Query Folding: • Adding custom/conditional columns with complex M logic • Merging with non-database queries • Sorting after certain transformations • Using functions not supported by the data source

Best Practices

Name queries descriptively — Use clear names like "Raw_Sales", "Cleaned_Customers" • Use staging queries — Separate raw data loading from transformation logic • Minimize query dependencies — Avoid overly complex chains • Leverage query folding — Keep foldable steps early in the pipeline • Disable load for intermediate queries — Only load final transformed tables • Document your queries — Add descriptions (right-click query → Properties)