Data Analytics
Zeitspanne
explore our new search
​
Power BI: Boost Speed with Query Folding
Power BI
2. Okt 2025 12:29

Power BI: Boost Speed with Query Folding

von HubSite 365 über Reza Rad (RADACAD) [MVP]

Founder | CEO @ RADACAD | Coach | Power BI Consultant | Author | Speaker | Regional Director | MVP

Boost Power BI and Microsoft Fabric refresh speed with Query Folding in Power Query for smarter, faster data performance

Key insights

  • Query Folding: Power Query converts supported transformation steps into a single native query (for example SQL) that the data source runs.
    This reduces data transfer and shifts heavy processing to the source, speeding up refreshes and lowering local resource use.
  • Performance gains: Folding improves refresh times, cuts memory and CPU usage in Power BI, and enables working with very large datasets without importing all rows.
    It also supports efficient Incremental Refresh by filtering data at the source instead of loading full tables.
  • How to check: Open Power Query Editor, right-click an applied step and choose View Native Query.
    If the option shows the query, that step folds; if it’s grayed out, Power Query cannot fold that step.
  • Folding indicators: Power Query shows status icons that signal whether a step is folding, not folding, might fold, is opaque, or is unknown.
    Use these markers to reorder or simplify steps so more work runs on the source.
  • Common causes of lost folding: Adding non-foldable transformations (custom functions, certain text operations, or index columns) or placing them before filters breaks folding.
    Fixes: apply filters early, use native or source-side logic, and prefer built-in foldable functions.
  • Best practices and 2025 tips: Use query parameters for filter values to keep steps foldable, push aggregations and filters to the database, and run Power BI 64-bit for large models.
    Test changes with View Native Query and aim for full or maximal partial folding to improve reliability and speed.

Overview of the video

In a recent YouTube video, Reza Rad (RADACAD) [MVP] explains the importance of Query Folding in Power Query for Power BI and Microsoft Fabric solutions. He presents the concept as a core performance technique, and then demonstrates when and how it happens, as well as its effects on refresh times and resource use. Consequently, the video targets developers and report authors who face long refresh times and need practical steps to diagnose and improve performance.


Rad frames the topic around a common pain point: slow data loads during refresh. He argues that many refresh issues stem from transformations that do not get translated into native queries at the source, which increases data transfer and local processing. Therefore, understanding folding helps teams decide whether to adjust transformations, change connectors, or push more work to the source system.


What Query Folding is and how to check it

The video defines Query Folding as Power Query’s ability to convert transformation steps into a single native query, such as SQL, that the data source can execute. As a result, filtering, aggregations, and joins happen at the source rather than in memory, which usually reduces the volume of data moved into Power BI and speeds up refreshes.


Rad shows how to verify folding in the Power Query Editor by right-clicking a step and choosing View Native Query. He also notes that when the option is grayed out, folding has stopped for that step. Moreover, he points out the status indicators that appear in the editor which hint whether a step is folding, not folding, might fold, or remains unknown, and he encourages viewers to inspect those markers during development.


Performance benefits and tradeoffs

Rad emphasizes that the primary advantage of folding is improved performance: when the source executes transformations, Power BI handles fewer rows and consumes less memory and CPU. Consequently, reports refresh faster and scale better with large datasets, and features such as incremental refresh depend on folding to limit the data retrieved by date or partition filters.


However, he also discusses tradeoffs. For instance, custom M functions, certain data connectors, or complex transformations can prevent folding. Therefore, while folding is desirable, developers sometimes sacrifice it for readability, maintainability, or necessary logic that cannot be expressed in the source query language. Rad advises balancing these factors: push operations to the source when possible, but accept local processing when the logic requires it.


Practical challenges and connector limitations

The video highlights common challenges such as connector support: not all connectors translate steps to native queries, and some return opaque plans that block folding. Additionally, combining data from different sources often forces Power Query to switch to local processing, which halts folding. Thus, teams must evaluate whether to centralize transformation logic in a source system or adjust their ETL patterns to preserve folding.


Rad also explores the role of parameters in preserving folding for scenarios like incremental refresh. He suggests designing parameters and filters to be foldable, for example by avoiding dynamic constructs that the connector cannot translate. Moreover, he warns that achieving full folding can require careful ordering of steps so early, simple operations remain foldable and later steps do not break the chain.


Best practices and takeaways

Throughout the tutorial, Rad recommends pragmatic best practices: inspect the native query where possible, limit transformations that the source cannot execute, and test performance tradeoffs. He encourages developers to prefer server-side processing for heavy aggregations but to apply local logic when business needs demand complex transformations not supported by the source.


Finally, Rad notes recent platform trends that affect decision making, such as ongoing updates to Power Query and Power BI and architectural shifts like moving users to 64-bit clients for larger workloads. He concludes that mastering Query Folding remains a valuable skill for improving refresh times and overall solution scalability, while acknowledging that achieving perfect folding is not always feasible and requires balancing performance, complexity, and maintainability.


Conclusion

In conclusion, Reza Rad’s video offers a clear, practical guide to understanding and diagnosing Query Folding in Power Query. He provides actionable steps for verification, explains the benefits and tradeoffs, and outlines how connector and transformation choices influence folding behavior. Therefore, Power BI authors and architects can use these insights to make informed tradeoffs between pushing work to the data source and keeping logic in Power Query.


For editorial readers, the video serves as a useful primer and refresher on a technical subject that has direct impact on report performance. Moreover, it underscores that performance tuning often involves compromise: improving refresh speed may mean reworking data architecture, while preserving complex business rules may necessitate accepting some local processing overhead.


Power BI - Power BI: Boost Speed with Query Folding

Keywords

Power BI query folding, Query folding in Power Query, Power Query performance tips, Optimize Power BI query folding, Improve Power BI performance, Diagnose query folding Power BI, M query folding techniques, Incremental refresh query folding