Selection: How do I make 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

  1. 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.

  1. Click OK on the Aggregated Value window

  2. Click OK on the Top N window

  3. 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: