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.

Load Month, count(Sales) as NumberOfSalesPerMonth from abc.csv group<br />

by Month;<br />

Load Month, count(distinct Customer) as CustomerBuyingPerMonth from<br />

abc.csv group by Month;<br />

LoadMonth, count(*) as NumberOfRecordsPerMonth from abc.csv group per<br />

Month;<br />

NumericCount([ distinct ] expression )<br />

Returns the numeric count of expression over a number of records as defined by a group by clause. If the<br />

word distinct occurs before the expression, all duplicates will be disregarded.<br />

Example:<br />

Load Month, NumericCount(Item) as NumberOfNumericItems from abc.csv<br />

group by Month;<br />

TextCount([ distinct ] expression)<br />

Returns the text count of expression over a number of records as defined by a group by clause. If the word<br />

distinct occurs before the expression, all duplicates will be disregarded.<br />

Example:<br />

Load Month, TextCount(Item) as NumberOfTextItems from abc.csv group by<br />

Month;<br />

NullCount([ distinct ] expression )<br />

Returns the NULL count of expression over a number of records as defined by a group by clause. If the<br />

word distinct occurs before the expression, all duplicates will be disregarded.<br />

Example:<br />

Load Month, NullCount(Item) as NumberOfNullItems from abc.csv group by<br />

Month;<br />

MissingCount([ distinct ] expression )<br />

Returns the missing count of expression over a number of records as defined by a group by clause. If the<br />

word distinct occurs before the expression, all duplicates will be disregarded.<br />

Example:<br />

Load Month, MissingCount(Item) as NumberOfMissingItems from abc.csv<br />

group by Month;<br />

Advanced Aggregation<br />

There is a special function for advanced aggregations:<br />

aggr ([ distinct | nodistinct ] [{set_expression}]expression {,<br />

dimension})<br />

Returns a set of values of expression calculated over dimensions. The result can be compared to the expression<br />

column of a 'local chart', evaluated in the context where the aggr function resides. Each dimension must<br />

be a single field. It cannot be an expression (calculated dimension).<br />

If the expression argument is preceded by the nodistinct qualifier, each combination of dimension values<br />

may generate more than one return value, depending on underlying data structure. If the expression argument<br />

is preceded by the distinct qualifier or if no qualifier is used at all, each combination of dimension values<br />

will generate only one return value.<br />

289

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

Saved successfully!

Ooh no, something went wrong!