add_whatif_parameter
Generate a Power BI what-if parameter with disconnected GENERATESERIES table and SELECTEDVALUE measure for slider-based scenario analysis.
Instructions
Create a WHAT-IF parameter: a disconnected GENERATESERIES calculated table plus a SELECTEDVALUE measure ([ Value]) that picks up the slider selection. Drop the table's column on a slider slicer and reference the value measure in your DAX. The standard Modeling > New parameter pattern.
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>",
"min": "<min>",
"max": "<max>",
"increment": "<increment>"
},
"name": "add_whatif_parameter"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max | Yes | maximum value | |
| min | Yes | minimum value | |
| name | Yes | ||
| increment | Yes | step / increment between values | |
| sessionId | Yes | ||
| defaultValue | No | default value the measure returns when nothing is selected (optional; defaults to min) |