Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 :
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.
Count(OrderNumber) will give you 9 as a result.
I just copy your script in Qlikview and it show like this below:
IN that case, It is not considering Order Number as 'Null' but 'Blank'
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.
If You want to consider OrderNumber as Null You need to add
set NullInterpret='';
then Count(Orders) = 9
Thanks everyone for the quick response!