bind_field_parameter
Bind a field parameter to a visual to enable dynamic field swapping in Power BI, filling the visual-side gap left by add_field_parameter.
Instructions
Bind a FIELD PARAMETER to a visual so it actually swaps fields when opened in Desktop - the visual-side piece the model-side add_field_parameter cannot write. The chosen role's projection becomes the parameter COLUMN with active=true (the dynamic-projection marker) and the prototypeQuery Select swaps to the parameter column; the four model-side pieces (the NAMEOF calculated table, ParameterMetadata, SortByColumn, GroupByColumns) come from add_field_parameter - run it first. role defaults to the visual's measure well (Y, else Values).
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": {
"reportSessionId": "<reportSessionId>",
"page": "<page>",
"visual": "<visual>",
"parameterTable": "<parameterTable>"
},
"name": "bind_field_parameter"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | Yes | page name or displayName | |
| role | No | the projection role to swap (Y | Values | Category | ...); defaults to Y, else Values | |
| visual | Yes | visual name | |
| parameterTable | Yes | the field-parameter table name (from add_field_parameter) | |
| parameterColumn | No | the parameter's display column; defaults to the table name (add_field_parameter's convention) | |
| reportSessionId | Yes |