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.

Returns the number of set bits in i. Where i is interpreted as a signed 64-bit integer, though only the first 48<br />

bits are significant. A value above 48-bits will return NULL.<br />

Examples:<br />

bitcount ( 3 ) returns 2<br />

bitcount( 100 ) returns 3<br />

bitcount( -1 ) returns 32<br />

bitcount( n )+bitcount(bitnot n ) returns 64 (as long as n is a valid integer).<br />

Back to Other Functions.<br />

Script Range Functions<br />

Range functions will replace the following General Numeric Functions (page 303): numsum, numavg,<br />

numcount, nummin and nummax, which should now be regarded as obsolete.<br />

rangesum(expr1 [ , expr2, ... exprN ])<br />

Returns the sum of a range of 1 to N arguments. As opposed to the + operator, rangesum will treat all nonnumeric<br />

values as 0.<br />

Examples:<br />

rangesum (1,2,4) returns 7<br />

rangesum (1,'xyz') returns 1<br />

rangesum (null( )) returns 0<br />

rangeavg(expr1 [ , expr2, ... exprN ])<br />

Returns the average of a range of 1 to N arguments. If no numeric value is found, NULL is returned.<br />

Examples:<br />

rangeavg (1,2,4) returns 2.33333333<br />

rangeavg (1,'xyz') returns 1<br />

rangeavg (null( ), 'abc') returns NULL<br />

rangecount(expr1 [ , expr2, ... exprN ])<br />

Returns the number of values found within a range of 1 to N arguments. NULL values are not counted.<br />

Examples:<br />

rangecount (1,2,4) returns 3<br />

rangecount (2,'xyz') returns 2<br />

rangecount (null( )) returns 0<br />

rangemin(expr1 [ , expr2, ... exprN ])<br />

Returns the lowest numeric value found within a range 1 to N arguments. If no numeric value is found,<br />

NULL is returned.<br />

Examples:<br />

308<br />

rangemin (1,2,4) returns 1<br />

rangemin (1,'xyz') returns 1<br />

rangemin (null( ), 'abc') returns NULL

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

Saved successfully!

Ooh no, something went wrong!