add_visual_topn
Add a visual-level top N filter that ranks a field by a measure and keeps the top or bottom n entries within the visual's own query.
Instructions
Add a VISUAL-LEVEL Top N: rank rankTable[rankField] by byTable[byMeasure], keep the top/bottom n, with the ranking applied in the visual's own query (a Top node in prototypeQuery.Where). direction=Top|Bottom. Distinct from add_topn_filter (which writes a filter card).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | Yes | how many to keep | |
| page | Yes | page name or displayName | |
| visual | Yes | visual name (from list_visuals) | |
| byTable | Yes | table that owns the ranking measure | |
| byMeasure | Yes | the measure that ranks | |
| direction | No | Top | Bottom | Top |
| rankField | Yes | the column being ranked/limited | |
| rankTable | Yes | table that owns the ranked field | |
| reportSessionId | Yes |