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.

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

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 up to rows above the bottom<br />

row. A negative offset number will actually make the bottom function equivalent to a top 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 last 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 />

bottom( sum( Sales ))<br />

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

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

rangeavg (bottom(sum(x),1,5))<br />

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

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

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

Returns the value of expression evaluated with a pivot table's dimension values as they appear in the column<br />

before the current column within a row segment in the pivot table. This function returns NULL in all chart<br />

types except pivot tables.<br />

On the first column of a row segment a NULL value will be returned, as there is no column before this one.<br />

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

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

If the pivot table has multiple horizontal dimensions, the current row segment will include only columns<br />

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

dimension of the inter field sort order. The inter field sort order for horizontal dimensions in pivot<br />

tables is defined simply by the order of the dimensions from top to bottom.<br />

Specifying an offset greater than 1 lets you move the evaluation of expression to columns further to the left<br />

of the current column. A negative offset number will actually make the before function equivalent to a after<br />

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

on the current column. 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 columns counting to the left from the original cell. In this form, the function can be used<br />

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

Examples:<br />

before( sum( Sales ))<br />

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

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

rangeavg<br />

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

818<br />

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

immediately to the left of the current column.

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

Saved successfully!

Ooh no, something went wrong!