Expressions: Aggregations On The Fly

The aggregation of data can be achieved within the Expression tool and used like a variable, without the need to create intermediate virtual variables. Multiple aggregations can be created in a single expression and combined together as if they were FastStats variables. These expression can then be used in all the places you would expect to be able to use expressions in FastStats - in selections, on a data grid or as a cube statistic or dimension.

The main aggregation types supported are the same as in the RFV function:

  • RECENCY - e.g. Last(Destination) a person has visited

  • FREQUENCY - e.g. Number of bookings for a person

  • VALUE - e.g. Mean(Cost) of bookings for a person

In addition, the following aggregations can be used where the result is on the transactional table:

  • MAX CATEGORY - e.g. Identify a person's most expensive purchase

  • RANK TRANSACTION - e.g. Rank a booking for a person

  • RELATIVE TRANSACTION - e.g. The cost of the next holiday

  • PATTERN MATCH - e.g Prioritise and identify records with a particular pattern of transactions

  • PERSONAL BEST - e.g. Establish the number of times a person has broken their previous record - for better or worse

  • CATEGORY GROUPING - e.g. Establish the most a person has spent on a single product category

  • RUNNING/ROLLING - e.g. Establish the value of a transaction from a defined number of previous transactions

 

For worked examples of Aggregations on the Fly, click on the following links:

Recency Aggregation Expression Example

Frequency Aggregation Expression Example

Value Aggregation Expression Example

Max Category Expression Example

Rank Transaction Expression Example

Relative Transaction Expression Example

Pattern Match Expression Example

Personal Best Expression Example

Category Grouping Example

Running/Rolling Example

 

In all these cases, the transactional table can have a filter selection defined to choose only a subset of transactional records.

 

For information on the use of Aggregated Expressions with Segmentation, see:

Segmentation: Using Aggregated Expressions