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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

If the table or table equivalent has multiple vertical dimensions, the current column segment will include<br />

only rows with the same values as the current row in all dimension columns except for the column showing<br />

the last dimension in the inter field sort order. The inter field sort order for pivot tables is defined simply by<br />

the order of the dimensions from left to right. For other chart types this can be manipulated in the Chart<br />

Properties: Sort dialog.<br />

Specifying an offset greater than 1 lets you move the evaluation of expression to rows further down the current<br />

row. A negative offset number will actually make the below function equivalent to a above function<br />

with the corresponding positive offset number. Specifying an offset of 0 will evaluate the expression on the<br />

current row. Recursive calls will return NULL.<br />

By specifying a third parameter n greater than 1, the function will return not one but a range of n values, one<br />

for each of n table rows counting downwards from the original cell. In this form, the function can be used as<br />

an argument to any of the special Chart Range Functions (page 809).<br />

Examples:<br />

below( sum( Sales ))<br />

below( sum( Sales ), 2 )<br />

below( total sum( Sales ))<br />

rangeavg<br />

(below(sum(x),1,3))<br />

returns an average of the three results of the sum(x) function evaluated on the<br />

three rows immediately below the current row.<br />

top([ total ] expression [ , offset [,n ]])<br />

Returns the value of expression evaluated with the chart's dimension values as they appear on the first row<br />

of the current column segment in a table or, in the case of bitmap charts, in the chart's straight table equivalent.<br />

If the chart is one-dimensional or if the expression is preceded by the total qualifier, the current column segment<br />

is always equal to the entire column.<br />

If the table or table equivalent has multiple vertical dimensions, the current column segment will include<br />

only rows with the same values as the current row in all dimension columns except for the column showing<br />

the last dimension in the inter field sort order. The inter field sort order for pivot tables is defined simply by<br />

the order of the dimensions from left to right. For other chart types this can be manipulated in the Chart<br />

Properties: Sort dialog.<br />

Specifying an offset greater than 1 lets you move the evaluation of expression down to rows below the top<br />

row. A negative offset number will actually make the top function equivalent to a bottom function with the<br />

corresponding positive offset number. Recursive calls will return NULL.<br />

By specifying a third parameter n greater than 1, the function will return not one but a range of n values, one<br />

for each of the first n rows of the current column segment. In this form, the function can be used as an argument<br />

to any of the special Chart Range Functions (page 809).<br />

Examples:<br />

sum( Sales ) / top( sum( Sales ))<br />

top( sum( Sales ), 2 )<br />

top( total sum( Sales ))<br />

rangeavg<br />

(top(sum(x),1,5))<br />

returns an average of the results of the sum(x) function evaluated on the five<br />

top rows of the current column segment.<br />

bottom([ total ] expression [ , offset [,n ]])<br />

817

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

Saved successfully!

Ooh no, something went wrong!