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.
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) |