add_analytics_line
Add analytical reference lines to Power BI charts for constant, min, max, average, median, trend, or forecast values, with optional labels and colors.
Instructions
Add an ANALYTICS reference line to a chart. kind = constant | min | max | average | median | trend | forecast. constant needs value; min/max/average/median compute from measureTable+measure; trend/forecast need no value. Optional label (data-label text on the line) and color (hex). Structure matched to the legacy analytics shape - verify the render in Desktop.
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>",
"kind": "<kind>"
},
"name": "add_analytics_line"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | constant | min | max | average | median | trend | forecast | |
| page | Yes | page name or displayName | |
| color | No | line colour hex e.g. #E81123 | |
| label | No | optional line label | |
| value | No | value for a constant line | |
| visual | Yes | chart visual name | |
| measure | No | measure that drives the line | |
| measureTable | No | table that owns the measure (for min/max/average/median/forecast) | |
| reportSessionId | Yes |