This process is just as time-consuming as it sounds, and only creates intermediate results. It also tends to result in the creation of two new variables that won’t be required for future analysis work.
New Solution – we now define aggregations directly within the expression tool. An ‘Add Aggregation’ button is on the Expression toolbar which creates a tab in the Expression (just like if you cyprus mobile numbers add a query or cube to an expression) in which the definition of that aggregation can be defined. Here is the definition for the Maximum(Cost) aggregation:
Maximum(Cost) aggregation
Expression
The expression can be tested by previewing it from within the tool. We can see the final result and all the aggregations that were contained within it.
on-the-fly_part_1_-_interna_-3.jpg
The expression can then be utilised within the TopN to solve this particular question, or could have been used in any of the other tools that support the use of expressions (as columns in a data grid, as dimensions or statistics in a cube etc).