Keeps a table's first N rows ranked by some ordering expression. Ties at the Nth position all stay, so more than N rows can come back, and output order isn't guaranteed.
Read more: Microsoft Learn
In the Ultra Transcenders books
Each book explains TOPN in context, with comparison tables and the common traps.
Terms in this definition
- Event
Table in Log Analytics where entries from Windows event logs are kept.
- FIRST
A DAX function available only inside visual calculations. It fetches the value at the start of one axis of the visual's matrix, which makes it handy for comparing each point with the first; its opposite is LAST.
- ALL
A DAX function that ignores any filters and gives back every row of a table or every value of the named columns. Used within CALCULATE, it works as a modifier that clears filters, although REMOVEFILTERS states that intent more clearly where it is available.
Related terms
- Top N filter
Keeps only the highest or lowest N items of a field, ranked by a value like a measure, and is set per visual in the Filters pane. Despite the shared idea of ranking, it is separate from DAX's TOPN function.