# Aggregated Top N selection

## Create an aggregated Top N selection

This feature allows you to take a numeric variable from a child table to use on the **Top N** function, without the need to create a virtual variable.

In this example, we will find the Top 10 People, based upon their total spend, using the Cost variable from the Bookings table.

1. Open a blank selection window at the **People** table level
2. Right click on the **New Selection** heading and select **Apply Top N** from the pop-up menu
3. Set the Top N window to show **Top** with a total of **10**
4. Drag the **Cost** variable onto the drop zone box

   The **Aggregated Value** window gives you the opportunity to decide what action to perform on the numeric variable — e.g. Sum, Mean, Maximum etc. You can also apply a filter selection to determine which records are examined. In this example, leave the settings on their default.
5. Click **OK** on the Aggregated Value window
6. Click **OK** on the Top N window
7. Click the **Build** button to calculate the 10 records

The above data grid shows the 10 People with a cell aggregation column of their total spend.

Related topic:

- [Top N selection](<https://help.apteco.com/en/faststats/analysis/selections/top-n-selection/index.md>)
