Limitation on max number of aggregations in an expression

000005552 |19/12/2014
Did this article help solve your issue?

   

Description

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.

Cause

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.

Resolution

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
  1. Open QlikView Desktop Client
  2. Open the QVW file that requires the change
  3. Go to Help > About QlikView…
  4. Right click on the QlikView logo in the lower left corner of the about dialog
  5. Highlight MaxRecurLevelForDefaultMissingAggr in the settings list
  6. Enter the desired number of aggregations to allow in an expression, or -1 for no limit 
  7. Click Set to store the value
  8. Click Save Next Script on Load
  9. Click Close to close the settings dialog
  10. Reload and save the QVW file
  11. The limit has now been changed in the QVW file
Enable Easter Egg on QlikView Server
  1. Change the QVW level setting as described in above section
  2. Save or publish the QVW to the QlikView Server Documents folder
  3. Open the QlikView Server’s settings.ini file in a text editor. Default file path; C:\ProgramData\QlikTech\QlikViewServer\Settings.ini
  4. 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
  5. Save the settings file and close text editor
  6. Restart QlikView Server, to trigger loading of the altered settings 
  7. Access the QVW from QlikView web client to see that the limit has been changed


NOTE: 
This setting was introduced in QlikView 11 SR2. 

DISCLAIMER: 
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.

Disclaimer

Access to this article is provided to you as part of your subscription to Qlik Maintenance. This article is deemed to be “Documentation” under the terms of the license agreement applicable to your Qlik software. All rights reserved © QlikTech International AB.

Use the quick links or the search bar on the front page for quick answers.

Selecting one or several business profiles ensures you get the most valid information presented to you.

A new self-service feature enables you to download a LEF or Request a control number with the click of a button.

A completely new element! Create and manage your Qlik environments for a great overview and to ease the case submission process. Add in your licenses and products and have a full view of your own environment setup.

Add stakeholders who should receive updates to the case. See the latest status of your case and if any actions are needed.

Submit your cases to us with ease using the new case logging wizard.

We would really appreciate your feedback which would help us improve the experience on the Support Portal. Please email us on SupportPortal@qlik.com