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:
Added in Q2 24
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.
-
Drag and drop the required grouping variable onto the Group records by drop-box - here for example, holiday Product:
-
Drag and drop the expression onto a data grid to check results:
Click to return to Expressions: Aggregations on the Fly