Understanding Query Folding in Power Query
February 25, 2026
Query folding is a powerful optimization technique in Power Query that can significantly enhance the performance of your data transformations. In simple terms, query folding refers to the process where Power Query pushes data transformation operations to the data source, allowing the source system to execute these tasks instead of processing the data locally within Power Query. This process not only reduces the volume of data transferred but also takes advantage of the data source’s computational resources, resulting in faster query execution.
For users working with large datasets or complex data models, query folding can drastically improve the efficiency of data refreshes and transformations. By reducing the need for extensive in-memory processing and large data transfers, query folding can also make your workflows more scalable and resource-efficient.

How Query Folding Impacts Our Work
- Improved Performance:
By offloading data processing tasks to the data source, query folding reduces the amount of data that needs to be transferred to Power Query. This speeds up query execution, particularly when dealing with large datasets. - Resource Efficiency:
Query folding ensures that the heavy lifting is done by the data source, saving local system resources such as memory and CPU. This is especially important when working with limited local computing power. - Faster Data Refreshes:
Since less data is being transferred between the source and Power Query, data refreshes are faster. This leads to more efficient ETL (Extract, Transform, Load) processes, making it easier to work with dynamic datasets. - Data Privacy:
Query folding respects the privacy settings defined for each data source. This ensures that sensitive data is handled securely and compliantly during the transformation process.
Query Evaluation Process:
To better understand how query folding works, let’s break down the evaluation process step by step. The following diagram provides a visual representation of the entire evaluation process, which includes how Power Query interacts with the data source and performs transformations.
Query Evaluation in Power Query
Submit M Script:
- M script is sent to Power Query engine with credentials and privacy settings.
Metadata Request:
- Power Query asks the data source for capabilities, schemas, and relationships.
Determine Transformations:
- Query folding decides which transformations can be handled by the data source.
Send Instructions:
- Instructions are sent for data retrieval and transformation.
Request Data:
- Power Query sends the transformation request to the data source.
Receive Data:
- Data source processes and sends the requested data to Power Query.
Apply Final Transformations:
- Power Query applies remaining transformations and loads the data to the destination.
Conclusion
Query folding is a crucial technique that optimizes the way Power Query interacts with data sources. It allows for more efficient, faster, and scalable data processing by offloading much of the computational work to the data source. Understanding how query folding works and how it impacts your data workflows can lead to significant performance improvements in your Power Query-based processes.