21.01.2013 Views

QlikView Reference Manual.pdf - QlikCommunity - QlikView

QlikView Reference Manual.pdf - QlikCommunity - QlikView

QlikView Reference Manual.pdf - QlikCommunity - QlikView

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

73 Calculated Formulas<br />

In the property dialogs of the <strong>QlikView</strong> sheets and sheet objects, there are a number of properties allowing<br />

fixed text labels or fixed numbers. These are typically used as labels, window titles, chart titles and in some<br />

cases as fixed numeric limits.<br />

For many of the property entries mentioned above, it is possible to enter a calculated expression rather than a<br />

constant text or number. This feature is called calculated formula. Wherever a calculated formula can be<br />

used, this is indicated on the relevant place in this manual.<br />

73.1 Entering a Calculated Formula<br />

Calculated formulas are entered according to the following syntax:<br />

= expression<br />

For the syntax of allowed expressions, see the section below.<br />

The equal sign in the first position of the entry indicates that the remainder should be interpreted as an<br />

expression. <strong>QlikView</strong> will try to evaluate the expression. If this is not possible, e.g. because of incorrect syntax,<br />

the entire label including the equal sign will be displayed.<br />

Calculated formulas can also be generated in the Edit Expression dialog which opens when clicking on the<br />

... button beside the edit box (see further Edit Expression Dialog (page 737)).<br />

73.2 Error Messages<br />

If a calculated formula cannot be correctly evaluated by <strong>QlikView</strong>, the formula itself will be returned, followed<br />

by two slashes and an error message.<br />

Example:<br />

= mode(x) //out of object memory<br />

Each calculated formula requires a certain amount of memory. In order not to use excessive memory, a limit<br />

on the allowed memory allocation for each calculated label has been put in to the program. If you enter a<br />

too complex expression, <strong>QlikView</strong> will return the expression followed by the error message “// out of object<br />

memory”.<br />

73.3 Calculated Formula<br />

The syntax for expression in calculated labels is virtually the same as for Chart Expressions (page 765),<br />

with a few exceptions:<br />

l With no dimensions to iterate over, the Chart Aggregation functions (page 770) will essentially behave as if used in<br />

chart expressions with the total qualifier in front of all field names. The total qualifier is thus optional and has no special<br />

meaning in calculated formulas. The set definitions work just as in chart expressions, i.e. they cause aggregations<br />

over a selection different than the current one.<br />

l In a calculated formula, field names may optionally be used without an enclosing aggregation function. In this case only<br />

will be used as an aggregation function.<br />

Example:<br />

is equal to<br />

= Currency<br />

= only(Currency)<br />

851

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!