Skip to content

Sorting

Sorting defines the row order in a report's output data. You can sort by one or several fields — both dimensions and metrics.

Step-by-step instructions

1. Add a sort rule

In the builder, go to the Data > Sorting section. Click Add sort.

2. Choose a field

Select the dimension or metric to sort by. All fields chosen in the Dimensions and Metrics sections are available.

3. Choose a direction

  • ASC (ascending) — from smallest to largest. For dates: earliest to latest. For text: alphabetical order A-Z
  • DESC (descending) — from largest to smallest. Typical for metrics: best results first

4. Add additional rules

You can add several sort rules. Priority is determined by order: sorting is applied by the first rule first, then by the second for ties, and so on. Drag rules to change their priority.

5. Account for performance

Sorting a large number of rows (100K+) can slow down report execution. If order doesn't matter, leave sorting empty.

Typical configurations

  • Top campaigns by spend > Cost DESC
  • Chronological report > Date ASC
  • Top by conversions with tiebreaker > Conversions DESC, Cost DESC
  • Alphabetical list > Campaign Name ASC

How to verify

  • Run the report and check the row order in the output sheet
  • For numeric fields, check that numbers are in the correct order
  • For text fields, check alphabetical order
  • With several rules, check correctness for ties on the first rule

Important notes

  • Sorting is applied after filtering, but before the row limit
  • When sorting by a metric, NULL values usually come last
  • Sorting doesn't affect deduplication in AppendDedup mode
  • Metrics — fields available for sorting
  • Dimensions — fields available for sorting
  • Row Limit — the limit is applied after sorting
  • Filters — filtering happens before sorting

Maintained by the LightLead Documentation Team · Last verified: 2026-07-25