To create a database ranking

  1. Add the objects that you want to appear in your query to the Result Objects pane of the Query Panel.
  2. Select the object that you want to rank by.
  3. Click Add a database ranking on the toolbar.

    The ranking outline appears in the Query Filters pane. The object that you selected appears as the ranking dimension, and the first measure in the query appears as the ranking measure in the "Based on" list.

  4. Select the ranking direction (Top or Bottom).
  5. Type the number of records you want the ranking to return in the box next to Top/Bottom.
  6. Drag the object that provides the calculation context for the measure to the For each box.

    This dimension is optional.

  7. Drag any objects that you want to include in the WHERE restriction to the white area of the ranking outline. For more information on the WHERE restriction, see the explanation under What is a subquery?.