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.

Note!<br />

Suppression of zero values is automatically disabled when these functions are used. NULL values are disregarded.<br />

Examples of Chart Ranking Functions (page 835)<br />

rank([ total ] expression [ , mode [, format ] ])<br />

Evaluates expression, compares the result with the result of the other rows containing the current column segment<br />

and returns the ranking of the current row within the segment. For bitmap charts, the current column<br />

segment is defined as it appears in the chart's straight table equivalent (Actually all <strong>QlikView</strong> charts have a<br />

straight table equivalent with the exception of the pivot table which has a more complex structure).<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. If the table or table equivalent has multiple vertical dimensions,<br />

the current column segment will include only rows with the same values as the current row in all dimension<br />

columns except for the column showing the last dimension in the inter field sort order.<br />

The ranking is returned as a dual value, which in the case when each row has a unique ranking will be an<br />

integer between 1 and the number of rows in the current column segment.<br />

In the case where several rows share the same ranking, the text and number representation can be controlled<br />

as follows:<br />

The second parameter mode specifies the number representation of the function result.<br />

mode<br />

0 (default) If all ranks within the sharing group fall on the low side of the middle value<br />

of the entire ranking, all rows get the lowest rank within the sharing group.<br />

If all ranks within the sharing group fall on the high side of the middle value<br />

of the entire ranking, all rows get the highest rank within the sharing group.<br />

If ranks within the sharing group span over the middle value of the entire ranking,<br />

all rows get the value corresponding to the average of the top and bottom<br />

ranking in the entire column segment.<br />

1 Lowest rank on all rows.<br />

2 Average rank on all rows.<br />

3 Highest rank on all rows.<br />

4 Lowest rank on first row, then incremented by one for each row.<br />

The third parameter format specifies the text representation of the function result.<br />

format<br />

0 (default) Low value&' - '&high value on all rows (e.g. 3 - 4).<br />

1 Low value on all rows.<br />

2 Low value on first row, blank on the following rows.<br />

The order of rows for mode 4 and format 2 is determined by the sort order of the chart dimensions.<br />

Examples:<br />

822<br />

rank( sum( Sales ))

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

Saved successfully!

Ooh no, something went wrong!