add_kpi_card
Add a premium KPI card to a Power BI report with a label, headline value, optional comparison delta, and optional sparkline.
Instructions
Add a PREMIUM KPI card: a white rounded panel (shadow) with an uppercase label, a big value, an optional coloured delta ('vs LY') and an optional sparkline - composed from proven primitives so it always renders. Far richer than add_card. Pass deltaMeasure for the comparison, and trendMeasure + dateTable/dateColumn for the sparkline.
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>",
"pageName": "<pageName>",
"table": "<table>",
"valueMeasure": "<valueMeasure>",
"label": "<label>"
},
"name": "add_kpi_card"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| label | Yes | uppercase label, e.g. SALES | |
| table | Yes | table that owns the measures | |
| width | No | ||
| height | No | ||
| pageName | Yes | ||
| dateTable | No | date table for the sparkline axis | |
| dateColumn | No | date column for the sparkline axis | |
| trendTable | No | optional table for the sparkline trend measure (defaults to table) | |
| valueColor | No | colour for the big value | #16365C |
| accentColor | No | accent colour for the delta + sparkline | #1B8A4B |
| deltaMeasure | No | optional delta/comparison measure, e.g. Sales Growth % | |
| trendMeasure | No | optional trend measure for the sparkline | |
| valueMeasure | Yes | the headline measure | |
| reportSessionId | Yes |