Loading the documentation…

Sorting, Top N and paging

Order a visual the way you need it, keep only the leading values with Top N, and move through a long result with pages or Load more. These are the controls on a single visual; the row rules behind them are on Row limits and paging, and the reader-facing basics of sorting and drilling are on Sort, drill and compare data.

Sort a visual

  1. Open the visual's menu and pick a field under Sort by. The first pick orders the visual ascending, and picking the same field again reverses the direction; the list stays open while you flip it, and an arrow beside the row marks the direction in use.

Keep the leading values with Top N

A Top N rule keeps only the top or bottom N values of one field. Use it when a visual shows more items than a reader needs and only a few of them matter.

Set up a rule

  1. Open the report in edit mode and select a single visual.
  2. Open Filters in the side panel and find the Top N section.
  3. Under Rank by, choose the field whose items you keep. The field is a dimension, not a measure.
  4. Under Order by, add a field with Add and set it to Highest first or Lowest first. The list offers the visual's measures plus the field you rank by.
  5. Under Show, pick 5, 10 or 20, or Custom and a number.
  6. Click Apply. The rule is staged while you edit, like the filters around it, and one Apply commits everything as a single change you can undo in one step. See Filters, slicers and interactions.

While a rule is active, the tile carries a badge such as Top 10, whose tooltip shows the ranked field and the order. Clear in the Top N section removes the rule. The rule is part of the report: it saves with the report and applies to everyone who opens it.

The count stays inside the visual's maximum:

Where a rule can sit

Top N narrows what a visual draws, so it is offered on ranked visuals only; see Visuals for the types.

How ranking runs

Ranking happens before the visual draws. DataMind groups the data by the ranked field, sorts the groups by your Order by fields, keeps the leading values, and then narrows the visual to those values.

What a rule changes about loading

Move through a long result

Questions, answered

Why did my sort come back after I switched fields?

The chart is driven by a field parameter, and such a chart keeps one order for each option. Switching back to that option brings its own order back, and clearing the order on screen leaves the other options as they were.

How can I sort by a field the visual does not draw?

Put it in Tooltips. That well is part of the sort list on purpose, so a field you keep only for ordering can sit there and still order the visual. A field the visual cannot resolve is left out of the list rather than offered and refused.

Why does the entry under the sort list say Clear sort while I edit and Reset to default while I read?

Because they undo different things. While you edit, the pick is the visual's saved order, so Clear sort removes what the report saves. While you read, the pick is yours, so Reset to default drops it and the visual returns to the author's order. Either entry stays disabled until there is an order to clear.

What happens to my sort when a sorted column's summarisation changes?

The sort follows the change: re-summarising a sorted measure, for example from Sum to Average, moves the order onto the new summarisation instead of dropping it. If the sorted field leaves the visual altogether, the sort is set aside so the tile keeps running. See Row limits and paging.

Can I use Top N on a KPI or a slicer?

No. Top N is offered on ranked visuals only. It is not offered on a KPI or Cards visual, on a slicer or slicer group, on a custom visual set to the Slicer role, or on a tile on the filter canvas.

Why can I not order by another column?

Order by offers the visual's measures plus the field you rank by. Ranking groups the data by the ranked field alone, so any other dimension would be dropped when the ranking runs; that is why it is not offered.

Why does my pie or funnel show fewer items than I asked for?

The number is kept inside the visual's maximum: 1,000 in general, 500 for a pie or donut, and 250 for a funnel. A number above the maximum is brought down to it when it is confirmed.

Why does a rule ordered by a percent-of-total measure rank nothing?

A measure worked out across the whole visual, such as a percent-of-total style, looks the same for every value at ranking time, so nothing stands out to rank. Order by a plain measure instead.

Why does a visual with Top N wait before it draws?

The rule first resolves which values to keep, and the tile holds its own run until the ranking settles. Without that, it would draw the full result first and redraw under the rule, showing values the rule is about to drop. If the ranking cannot run, the visual draws without narrowing and the rule stays set.

Can a reader change a Top N rule?

No. A Top N rule is part of the report, like a filter, and applies to everyone who opens it: while you read, you see the narrowed result and the tile's badge, such as Top 10, and changing or clearing it needs edit mode. See Set up a rule.

Why did Load more stop while rows remain?

A tile accumulates windows up to its cap, about a million rows, and stops there; the footer then tells you the row limit is reached and points to Export, which carries the full result, not only the loaded rows. See Export reports and data.

Why did the pager move me back a page?

The page you were on no longer exists, for example after you raised the page size so the result holds fewer pages. The visual pulls you back to a page with rows rather than loading an empty one.