add_dynamic_topn
Create a dynamic Top N filter with a what-if slider and an Others bucket for all items beyond the selected rank.
Instructions
Generate a dynamic Top N: a what-if N slider, a UNION+Others dimension table, and a rank-or-others measure that buckets everything below rank N into an Others row.
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>",
"homeTable": "<homeTable>",
"dimension": "<dimension>",
"measure": "<measure>"
},
"name": "add_dynamic_topn"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nMax | No | maximum N (default 20) | |
| nMin | No | minimum N (default 1) | |
| measure | Yes | the measure to rank on | |
| nDefault | No | default N (optional) | |
| dimension | Yes | dimension column as Table[Column] | |
| homeTable | Yes | home table for the measure | |
| sessionId | Yes | ||
| nIncrement | No | N increment (default 1) | |
| othersLabel | No | label for the Others bucket (default Others) | |
| topNTableName | No | name for the Top N dimension table (optional) |