# Personal Best

The Personal Best features allows us to more easily establish the number of times a person has broken their previous record – for the better or worse - on a numeric value, such as their spend on a holiday booking. In this way we can more easily identify customers who are increasing or lessening in value over time and then take appropriate action with our marketing.

A person’s transactions are sorted into order and a numeric value is returned for each transactional record, as follows:

| \-2 | Current transaction has the lowest value in the sequence so far (worst so far "personal worst") |
| --- | --- |
| \-1 | Current transaction has a lower value in the sequence than the previous record ("worse") |
| 0 | Current transaction has the same value in the sequence as the previous record ("unchanged") NOTE: The first transaction will always have a value of 0 |
| 1 | Current transaction has a higher value in the sequence than the previous value ("better") |
| 2 | Current transaction has the highest value in the sequence so far (best so far "personal best") |

## Setting up a personal best expression

In a new Expression window:

1. Click on the **Add Aggregation** button and then on the tab entitled **Frequency(Bookings)** that opens up.
2. In the Type drop down select **Personal Best**.
3. Set the Grouping Table to **People** and Transactional Table to **Bookings**.
4. Drag the **Booking Date** variable onto the **Order records by** drop-box and leave the **From** as **Earliest to Latest**
5. Drag the **Cost** variable onto the **Pick the** drop-box.

Based on these settings, FastStats will order bookings by Booking Date and examine how the Cost compares across the individual's bookings to date, from earliest to latest.

Use a data grid to verify the results:

## Grouping by category

The Personal Best on the fly aggregation processing mechanism also allows you to specify a selector type grouping variable, with transactions split into these groups before the personal best algorithm is applied to each group individually.

1. Drag and drop the required grouping variable onto the **Group records by** drop-box - here for example, holiday **Product**:
2. Drag and drop the expression onto a data grid to check results:
