Early Access: The content on this website is provided for informational purposes only in connection with pre-General Availability Qlik Products.
All content is subject to change and is provided without warranty.
Skip to main content

NumericCount - script function

NumericCount() returns the number of numeric values found in the expression, as defined by a group by clause.

Syntax:  

NumericCount ( [ distinct ] expr)

Return data type: integer

Arguments:  

NumericCount arguments
Argument Description
expr The expression or field containing the data to be measured.
distinct If the word distinct occurs before the expression, all duplicates are disregarded.

Examples and results:  

Add the example script to your document and run it. Then add, at least, the fields listed in the results column to a sheet in our document to see the result.

Example 1:  

Temp:

LOAD * inline [

Customer|Product|OrderNumber|UnitSales|UnitPrice

Astrida|AA|1|4|16

Astrida|AA|7|10|15

Astrida|BB|4|9|9

Betacab|CC|6|5|10

Betacab|AA|5|2|20

Betacab|BB||| 25

Canutility|AA|||15

Canutility|CC| ||19

Divadip|CC|2|4|16

Divadip|DD|7|1|25

] (delimiter is '|');

NumCount1:

LOAD Customer,NumericCount(OrderNumber) as NumericCountByCustomer Resident Temp Group By Customer;

Example 1 results
Customer NumericCountByCustomer
Astrida 3
Betacab 2
Canutility 0
Divadip 2

Example 2:  

LOAD NumericCount(OrderNumber) as TotalNumericCount Resident Temp;

The second statement gives:
TotalNumericCount
7

Example 3:  

Given that the Temp table is loaded as in the previous example:

LOAD NumericCount(distinct OrderNumber) as TotalNumericCountDistinct Resident Temp;

TotalNumericCountDistinct
6
Because there is one OrderNumber that duplicates another, so the result is 6 distinct values.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!

Join the Analytics Modernization Program

Remove banner from view

Modernize without compromising your valuable QlikView apps with the Analytics Modernization Program. Click here for more information or reach out: ampquestions@qlik.com