CLUSTER
Syntax
<cluster-expression> := 'CLUSTER(' <Key> ')'
Since
2.1.2
Return-type
Key
Description
The function CLUSTER replaces keys in the argument by their parents if all siblings of the key also appear in the argument. The result of the CLUSTER-function is clustered again unless it is not cluster-able any more.
This function is useful to reduce the number of loaded keys and facts, e.g. if you want to aggregate a fact for a specified range of time.
If the argument is NULL, the function returns NULL.
Examples
CLUSTER( Time:'Q1/2003' + Time:'Q2/2003' + Time:'Q3/2003' + Time:'Q4/2003' + Time:'Q1/2003' )
= Time:'2003' + Time:'Q1/2004'
CLUSTER( NULL )
= NULL
SUM( Amount( CLUSTER( Time ) ) )
Efficient aggregation of the fact "Amount" for a time-span
