---
url: /set-instructions/sort-by-value-using-the-next-instruction-descending.md
description: >-
  Sorts the working set by the value the next instruction produces, descending.
  Workview column axis only.
---

# Sort By Value Using The Next Instruction (Descending)

**Workview-only. Column axis only.** The descending equivalent of [Sort By Value Using The Next Instruction (Ascending)](/set-instructions/sort-by-value-using-the-next-instruction-ascending) - sorts the working list (on the row axis) by the value of a measure or formula specified in the *next* instruction, highest to lowest. The usual choice for "top N by value" reports.

::: warning Needs a value provider immediately after it
This instruction reads its sort criterion from the very next instruction in the stack - it doesn't carry one itself. If that instruction doesn't produce a value (a name-based sort, for example), the sort won't behave as expected.
:::

#### Example

```
1. Element: All Products
2. Expand All
3. Remove Consolidations
4. Sort By Value Using The Next Instruction (Descending)
5. Insert Using Formula: LINK("Sales", ["Revenue"])
```

Step 5 is the value step 4 sorts by - this produces "products ranked from highest to lowest Revenue," the classic top-N layout. See [Common Patterns](/set-instructions/common-patterns#pattern-5-sorting-by-a-measure) for the full pattern.

![Sort By Value Ascending and Descending compared against the same unsorted working set, with the value each sorts by shown alongside](/set-instructions-example-sort-by-value.svg)
