MSK Institute LogoMSK.Institute
HomeCourses
Book Free Demo➔Sign In
Free Demo➔
MSK Institute LogoMSK.Institute

Leading computer training academy in Shikohabad for software engineering, Python, web development, and digital literacy.

ISO 9001:2015 Certified Center
Follow & Connect
4.9

Programs & Admissions

  • All CoursesCatalog
  • Learning PathsRoadmaps
  • Student ProjectsShowcase
  • Live Classes & ScheduleLive
  • Upcoming Batches
  • Campuses & LocationsHub
  • Verify Certificates
  • Book Free Demo Class

Resources & Tools

  • Free Online Mock TestsAll Tests
  • NIELIT CCC Mock TestFree
  • Course & Career FinderQuiz
  • Study Material Hub
  • All MSK ToolsHub
  • Keyboard ShortcutsNew
  • TypeQuest Speed LabTyping
  • MSK Code PlaygroundCode
  • Interactive Tutorials
  • Quick Cheatsheets

Institute & Contact

  • About MSK Institute
  • Careers & InternshipsHiring
  • Publications & Blogs
  • Gali No. 3, Near Gyan Jyoti Public School,
    Adarsh Nagar, Shikohabad, Uttar Pradesh 283135
  • +91 83930 42166
  • mskshikohabad@gmail.com
  • Hours:Mon – Sat: 8:00 AM – 7:00 PM | Sun: 10:00 AM – 2:00 PM
  • 4.9 ★(38 Google Reviews)
© 2026 MSK Institute. All rights reserved.•Privacy Policy•Terms of Service•Disclaimer•Contact Us

Shikohabad's Leading Computer & Coding Academy

Home
Courses
Live
Material
Query Diagnostics0%
Study MaterialsCheatsheet
Power BI for IntermediateProgress 0%
1.1Quick recap of Import, Modeling, DAX1.2Project requirements for Intermediate Level
6.1Optimizing Data Models6.2Query Diagnostics6.3Best Practices for Report Performance
HomeTutorialsPower BI for IntermediateQuery Diagnostics
Best Practices for Report Performance

Query Diagnostics

Beginner12 min read•Updated: 2026-11-18•By Er. Sumit Kumar (MSK Institute)
Study MaterialsCheatsheet

When Power BI reports take tens of minutes to refresh or when visual interactions feel slow, the root cause is frequently an un-optimized Power Query ETL transformation. To debug data extraction performance, intermediate developers utilize Query Diagnostics and master Query Folding.


1. What is Query Folding? (The Silver Bullet of ETL)

Query Folding is the ability of Power Query to translate user transformation steps (filtering, grouping, joining, column selection) into a single native query (such as SQL) and execute it on the source database server:

Visual Architecture & Process Flow

How data and code flow step-by-step

Flowchart
Step 1
1. Filter: Country = "India" ---
Step 2
SELECT CustomerID, City, SUM
Sales

Why Query Folding is Critical:

  • The database server (SQL Server, Oracle, Snowflake) performs the heavy filtering and aggregation using its indexed hardware.
  • Only the compact, aggregated final result is sent over the network to Power BI.
  • Enables Incremental Refresh in the Power BI Service!

2. Checking if a Step is Folding

  1. 1
    In Power Query Editor, right-click on the last applied step in the Applied Steps list.
  2. 2
    Inspect the View Native Query option:
  • Enabled (Clickable): The step folds! You can click it to view the exact SQL statement generated.
  • Disabled (Grayed Out): Query folding has broken! Power Query was forced to download the entire un-filtered raw dataset into local memory to evaluate that step.
1Common Steps that PRESERVE Query Folding:
2[X] Filter rows (WHERE clause)
3[X] Select or remove columns (SELECT column list)
4[X] Group By and Aggregations (GROUP BY / Aggregate functions)
5[X] Inner joins with other folded queries (INNER JOIN)
6 
7Common Steps that BREAK Query Folding:
8[!] Complex custom M functions
9[!] Changing data types across non-compatible formats
10[!] Running Python or R scripts in Power Query
11[!] Index column insertion

3. Running Query Diagnostics

To trace which exact step is taking the most CPU time or network I/O:

  1. 1
    In Power Query Editor, go to the Tools ribbon tab.
  2. 2
    Click Start Diagnostics.
  3. 3
    Perform the query refresh.
  4. 4
    Click Stop Diagnostics.
  5. 5
    Power Query automatically generates diagnostic result tables detailing query duration, resource usage, and data source activity.

Interactive Quiz• Knowledge Check

Multiple Choice Questions

Question 1
What is Query Folding in Microsoft Power BI?
Question 2
How can an analyst quickly verify if an applied step in Power Query is successfully folding?
Question 3
Which of the following operations is most likely to BREAK Query Folding in Power Query?
Question 4
Why is Query Folding an absolute prerequisite for configuring Incremental Refresh in the Power BI Service?
Question 5
Where do you find the "Start Diagnostics" and "Stop Diagnostics" buttons in Power Query Editor?

Next Lesson

Best Practices for Report Performance

Continue learning with hands-on practice, examples, and exercises in the upcoming topic.

Related Lessons

Previous LessonNext Lesson
Optimizing Data ModelsBest Practices for Report Performance

Practice Quiz

Test your understanding of this lesson with 5 questions. Each question has one correct answer.

12-Month Data Analysis Mastery Program

Master Full-Stack Data Analytics (Excel, SQL, Python, Power BI & Tableau)

Combine 15 complete courses, 150 chapters, 541 topics, live SQL/Power BI/Tableau dashboards, and Scikit-Learn capstones at MSK Institute Shikohabad or Live Online.

View Full CourseBook Free Demo
PreviousNext
PreviousPrevNext