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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sessionId": "<sessionId>",
"name": "<name>",
"fields": "<fields>"
},
"name": "add_field_parameter"
}
}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 |