Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
pradeep92
Partner - Creator II
Partner - Creator II

Count in chart

When I give Count(OrderNumber) i get only 9 records leaving the null value in CHART whereas in Script it is showing 9 records..

GIVEN IN HELP :

Count(OrderNumber)

10, because there are 10 fields that could have a value for OrderNumber, and all records, even empty ones, are counted.

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|1|25| 25

Canutility|AA|3|8|15

Canutility|CC|||19

Divadip|CC|2|4|16

Divadip|DD|3|1|25

] (delimiter is '|');

what is the exact output :

1 Solution

Accepted Solutions
dwarikapanigrah
Contributor III
Contributor III

Hi Pradeep

Its a good question , QV treated a blank space as a information rather as null.

So in your first case it should give  Count(OrderNumber) =10 .

Now if you handle null condition like below "Set NullInterpret = ''; "   now Count(OrderNumber) = 9.


Please refer the QVW.

View solution in original post

6 Replies
shraddha_g
Partner - Master III
Partner - Master III

Count(OrderNumber) will give you 9 as a result.

Anonymous
Not applicable

I just copy your script in Qlikview and it show like this below:

ordernum.PNG

shraddha_g
Partner - Master III
Partner - Master III

IN that case, It is not considering Order Number as 'Null' but 'Blank'

dwarikapanigrah
Contributor III
Contributor III

Hi Pradeep

Its a good question , QV treated a blank space as a information rather as null.

So in your first case it should give  Count(OrderNumber) =10 .

Now if you handle null condition like below "Set NullInterpret = ''; "   now Count(OrderNumber) = 9.


Please refer the QVW.

antoniotiman
Master III
Master III

If You want to consider OrderNumber as Null You need to add

set NullInterpret='';

then Count(Orders) = 9

pradeep92
Partner - Creator II
Partner - Creator II
Author

Thanks everyone for the quick response!