Table.StopFolding

Updated on

Table.StopFolding is a Power Query M function that prevents any downstream operations from being run against the original source of the data in the table. The function returns a table.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365

Syntax

Table.StopFolding( table as table ) as table

Description

The Table.StopFolding function in Power Query serves to stop query folding, preventing transformations from being pushed back to the data source. This is useful when you need to optimize performance in specific situations where query folding is not beneficial.

Unlike alternative methods, like buffering the entire table into memory or adding an index column, this function accomplishes the goal with no additional side effects.

Applying the function ensures that subsequent operations are computed in Power Query, not against the original data source.

Examples

Fetches data from a SQL table in a way that prevents any downstream operations from running as a query on the SQL server.

// Output: table
let
    Source = Sql.Database( "SomeSQLServer", "MyDb" ),
    MyTable = Source{[Item="MyTable"]}[Data],
    MyLocalTable = Table.StopFolding( dbo_MyTable )
in
    MyLocalTable

Learn more about Table.StopFolding in the following articles:

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/table-stopfolding

2023-2026 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy