add_svg_icon
Create an SVG threshold icon measure for Power BI: display a unicode glyph whose color reflects the value's band. Provide rules as a JSON array of min, max, glyph, and color.
Instructions
Author an SVG THRESHOLD ICON measure (DataCategory=ImageUrl): renders a unicode glyph in a colour chosen by which [min,max) band the value falls into. rules = JSON array of {min,max,glyph,color}, e.g. [{"min":-1e9,"max":0,"glyph":"▼","color":"#D7263D"},{"min":0,"max":1e9,"glyph":"▲","color":"#2E7D32"}].
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>",
"name": "<name>",
"valueMeasure": "<valueMeasure>",
"rules": "<rules>"
},
"name": "add_svg_icon"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| size | No | svg size in px (square) | |
| rules | Yes | JSON array of {min,max,glyph,color} rules | |
| table | Yes | ||
| sessionId | Yes | ||
| valueMeasure | Yes | the value measure tested against the bands |