add_topn_filter
Add a top-N or bottom-N filter to a visual, page, or report, keeping only the highest- or lowest-ranked items based on a specified measure.
Instructions
Add a TOP-N (or bottom-N) filter at a scope=visual|page|report: keep the top/bottom n of table[field] ranked by byTable[byMeasure]. direction=top|bottom. For scope=visual pass page+visual; scope=page pass page.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | Yes | how many to keep | |
| page | No | page (scope=visual|page) | |
| field | Yes | the column being ranked/limited | |
| scope | Yes | visual | page | report | |
| table | Yes | table that owns the field to rank | |
| visual | No | visual (scope=visual) | |
| byTable | Yes | table that owns the ranking measure | |
| byMeasure | Yes | the measure that ranks | |
| direction | No | top | bottom | top |
| reportSessionId | Yes |