Ravindra BagaleCourses & study guides

6. Power Query Essentials

6.10 Query Folding

Query folding means Power Query translates your steps into a single query in the source's own language (for example SQL) so the source database does the work, instead of Power BI downloading all rows and processing them locally.

  • Folding happens only with sources that understand queries – databases like SQL Server, Oracle, many OData feeds. Flat files such as Excel and CSV do not fold.
  • Steps such as filter rows, remove columns, rename, simple joins, group by usually fold.
  • Some steps break folding, for example adding an Index column or certain custom M functions. Once folding breaks, later steps also run locally.
  • How to check: right-click a step › View Native Query (if enabled, the step folds). Newer versions also show step folding indicators next to each applied step.

Why folding matters

Folding makes refresh much faster, it is how DirectQuery (डेटा स्रोतातच राहतो, प्रत्येक क्लिकला थेट क्वेरी) works, and it is essential for incremental refresh to be effective (without folding, Power Query still has to read all rows from the source). Do filtering and column removal early in your steps, and place steps that break folding as late as possible.

Ravindra Bagale's Tip

Folding madhli sagalyat jast disnari chuk mhanje assuming everything folds. Steps after a native SQL query, an index column or a custom function often don't. Right-click the steps to check View Native Query, especially before setting up incremental refresh, which depends on folding. Punha ekda karun bagha, mag pudhe jaa.