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.

Set Modifiers with Implicit Field Value Definitions<br />

In the above examples, all field values have been explicitly defined or defined through searches. There is<br />

however an additional way to define a set of field values by the use of a nested set definition.<br />

In such cases, the element functions P() and E() must be used, representing the element set of possible values<br />

and the excluded values of a field, respectively. Inside the brackets, it is possible to specify one set expression<br />

and one field, e.g. P({1} Customer). These functions cannot be used in other expressions:<br />

Examples:<br />

sum( {$} Sales )<br />

returns the sales for current selection, but only those customers that ever have bought the product<br />

‘Shoe’. The element function P( ) here returns a list of possible customers; those that are implied by<br />

the selection ‘Shoe’ in the field Product.<br />

sum( {$} Sales )<br />

same as above. If the field in the element function is omitted, the function will return the possible<br />

values of the field specified in the outer assignment.<br />

sum( {$} Sales )<br />

returns the sales for current selection, but only those customers that ever have supplied the product<br />

‘Shoe’. The element function P( ) here returns a list of possible suppliers; those that are implied by<br />

the selection ‘Shoe’ in the field Product. The list of suppliers is then used as a selection in the field<br />

Customer.<br />

sum( {$} Sales )<br />

returns the sales for current selection, but only those customers that never bought the product ‘Shoe’.<br />

The element function E( ) here returns the list of excluded customers; those that are excluded by the<br />

selection ‘Shoe’ in the field Product.<br />

Syntax for Sets<br />

Hence, the full syntax (not including the optional use of standard brackets to define precedence) is<br />

set_expression ::= { set_entity { set_operator set_entity } }<br />

set_entity ::= set_identifier [ set_modifier ]<br />

set_identifier ::= 1 | $ | $N | $_N | bookmark_id | bookmark_name<br />

set_operator ::= + | - | * | /<br />

set_modifier ::= < field_selection {, field_selection } ><br />

field_selection ::= field_name [ = | += | ¬–= | *= | /= ] element_set_expression<br />

element_set_expression ::= element_set { set_operator element_set }<br />

element_set ::= [ field_name ] | { element_list } | element_function<br />

element_list ::= element { , element }<br />

element_function ::= ( P | E ) ( [ set_expression ] [ field_name ] )<br />

element ::= field_value | " search_mask "<br />

68.5 Synthetic Dimension Functions<br />

ValueList (value {, value })<br />

Returns a set of listed values which, when used in a calculated dimension, will form a synthetic dimension.<br />

In charts with a synthetic dimension created with the valuelist function it is possible to reference the dimension<br />

value corresponding to a specific expression cell by restating the valuelist function with the same<br />

parameters in the chart expression. The function may of course be used anywhere in the layout, but apart<br />

from when used for synthetic dimensions it will only be meaningful inside an aggregation function.<br />

Examples:<br />

803

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

Saved successfully!

Ooh no, something went wrong!