Skip to main content
100%

[Power Query] Closures, partial application and cascading parameters

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

This example demonstrates a data-visualization technique that uses Power Query’s `setParameters` function to create cascading parameters through closures and partial application. The code shows how a function `_fn_` is wrapped in a closure, where `fnCopy` is defined as `(x) => setParameters(fn(x),{1..x})`, allowing dynamic parameter injection. The outer call `setParameters(fnCopy,{1..9})` further restricts the parameter set, illustrating nested parameter scoping. The visualization itself is not a chart but a programmatic pattern for controlling function behavior, relying on Power Query’s M language rather than a graphical library. It highlights how parameter cascading can be achieved without external data sources or rendering, focusing on functional composition.

AI-generated description

Similar vizzes