Skip to main content
100%

[Power Query] Closures, partial application and cascading parameters

✓ Published0🌍 Public
HHugoberry
Last edited Oct 13, 2017
Created on Oct 12, 2017

This example shows how Power Query’s cascading parameters control a dynamic data-filtering workflow. The code defines a closure that partially applies a filter function, returning a new function for later invocation. Using the M language’s `Function.Invoke` and `List.Select` APIs, it passes a column value into a nested lambda, demonstrating how parameter values flow through successive scopes. The gist’s `fn.ts` file illustrates the pattern with a simple identity function, while the visible M code applies this pattern to filter table rows based on a stored parameter. The approach highlights how Power Query’s functional composition enables reusable, parameter-driven query logic without hard-coding values.

AI-generated description

Similar vizzes