add_field_parameter
Create a field parameter table in Power BI to let users switch between fields via a slicer.
Instructions
Create a FIELD PARAMETER - a small calculated table that lets a user swap which field a visual shows. Pass the fields as Table[Column] references; the first generated column drops onto a slicer to switch between them. Builds the {("Display", NAMEOF('T'[Col]), order), ...} table with the parameter metadata the report layer recognises.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | name for the field-parameter table, e.g. 'Measure Selector' | |
| fields | Yes | fields to switch between, comma-separated Table[Column] refs, e.g. "Sales[Amount],Sales[Qty]" | |
| sessionId | Yes |