Expressions: Aggregations On The Fly - 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")

In a new Expression window:

  • Click on the Add Aggregation button and then on the tab entitled Frequency(Bookings) that opens up

  • In the Type drop down select Personal Best

  • Set the Grouping Table to People and Transactional Table to Bookings

  • Drag the Booking Date variable onto the Order records by drop-box and leave the From as Earliest to Latest

  • 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:

 

Click to return to Expressions: Aggregations on the Fly