set_kpi
Attach a KPI to a measure by setting a target and status expression, enabling a traffic-light indicator to compare performance.
Instructions
Attach a KPI to a measure: a target to compare against and a status expression (typically returns -1/0/1 for bad/neutral/good) that drives a traffic-light indicator. statusGraphic picks the indicator set (default 'Three Circles Colored').
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>",
"table": "<table>",
"measure": "<measure>",
"targetExpression": "<targetExpression>",
"statusExpression": "<statusExpression>"
},
"name": "set_kpi"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | table the measure is on | |
| measure | Yes | measure to attach the KPI to | |
| sessionId | Yes | ||
| statusGraphic | No | indicator graphic set (optional; default 'Three Circles Colored') | |
| statusExpression | Yes | DAX status expression returning e.g. -1/0/1 | |
| targetExpression | Yes | DAX target expression, e.g. [Sales Target] |