Limitation on max number of aggregations in an expression
Article Number: 000005552 | Last Modified: 2014/12/19
An expression is not allowed to contain more than 501 aggregations.
For example the following expression will be calculated
x1 + x2 + x3 + ... + x501
An expression with 502 aggregations will not be calculated, and instead result in NULL.
x1 + x2 + x3 + ... + x502
The x values are arbitrary numeric values or function calls that return a numeric value.
The aggregation is executed in a recursive manner in the software. The limitation of 500 was added in QlikView to prohibit execution of infinite recursive calls, which would hang or crash the application.
The maximum number of aggregations in an expression aggregation can be altered through an Easter Egg setting in QlikView. The setting is called MaxRecurLevelForDefaultMissingAggr and defines the number of aggregations allowed in an expression.
The default value for MaxRecurLevelForDefaultMissingAggr is 500 in the 32 bit edition of QlikView, and -1 (no limit) in the 64 bit edition of QlikView. This means that there should only be reason to alter the value in an 32 bit installations of QlikView.
Enable Easter Egg feature in QlikView Desktop client
Enable Easter Egg on QlikView Server
- Open QlikView Desktop Client
- Open the QVW file that requires the change
- Go to Help > About QlikView…
- Right click on the QlikView logo in the lower left corner of the about dialog
- Highlight MaxRecurLevelForDefaultMissingAggr in the settings list
- Enter the desired number of aggregations to allow in an expression, or -1 for no limit
- Click Set to store the value
- Click Save Next Script on Load
- Click Close to close the settings dialog
- Reload and save the QVW file
- The limit has now been changed in the QVW file
This setting was introduced in QlikView 11 SR2.
The easter egg features are not supported and should be used with caution. The features may be withdrawn in later service or major releases of QlikView.
- Change the QVW level setting as described in above section
- Save or publish the QVW to the QlikView Server Documents folder
- Open the QlikView Server’s settings.ini file in a text editor. Default file path; C:\ProgramData\QlikTech\QlikViewServer\Settings.ini
- Add MaxRecurLevelForDefaultMissingAggr=nnn in the [Settings 7] section of the settings file. Note that nnn should be replaced with the same value as specified in step 6 in above section
- Save the settings file and close text editor
- Restart QlikView Server, to trigger loading of the altered settings
- Access the QVW from QlikView web client to see that the limit has been changed