Power BI for Data Analytics & Business Intelligence
Back to Ingestion Architecture, Power Query & Storage Modes

Diagnosing & Fixing Broken Query Folding in Power Query

How to isolate non-folding M steps, inspect Query Plans, and enable query folding on custom native SQL queries.

8 minutesVideo LessonPDF notes
🎯 Free Guest Mode: You are learning for free. Sign in to save your completion progress and quiz answers.
Loading progress...

Key moments

  1. Query Folding Fundamentals — The instructor explains query folding principles and contrasts supported native calculations against unsupported text transformations.
  2. Applied Steps Native Query — The instructor demonstrates how to inspect native SQL queries through the Applied Steps context menu and observes grayed-out states.
  3. Azure Data Studio Tracing — An external profiler trace is configured in Azure Data Studio to capture SQL Server events and confirm hidden folding.
  4. Query Diagnostics on OData — The instructor uses the Diagnose Step tool to verify server-side query parameter folding on an OData web feed.
PDF notes

Frequently asked questions

Why is 'View Native Query' disabled after adding a 'Keep Top Rows' step?

Power Query's UI cannot always generate the display script for partial wrapper operations, even though the step folds into a SQL TOP clause at runtime.

How can I confirm that an OData connector is folding query filters?

Run Diagnose Step and filter the diagnostic evaluation table to 'get response stream' to inspect whether $filter parameters were pushed in the request URL.

What happens when query folding completely fails in a data pipeline?

Power Query downloads the entire unfiltered dataset from the source and performs all subsequent filtering and transformations using local computer memory.

How was this lesson?

Your feedback helps us refine explanations and catch bugs.