Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
je48746stijn
Contributor III
Contributor III

NULL values ignored in Aggr(Count(DISTINCT... ), ..) ?

Dear all,

can anyone tell me if NULL values are ignored in an Aggr(Count(DISTINCT ..), ..) calculated field ? I think it does because for some Counterparty's, where DealType is NULL, it doesn't count the null values as a distinct value.  For example, it gives 8 where it should give 9.

 

See example below :

=Aggr(Count({$<[Record Type]={'DEAL'}>}DISTINCT DealType),[Counterparty])

 

Many thanks in advance,

 

Stijn, Belgium

Labels (4)
1 Solution

Accepted Solutions
je48746stijn
Contributor III
Contributor III
Author

OK thanks for your reply Sunny. I was not aware that the Count function does not look at Null values.  The NullCount function however does return 0 instead of 9.

Also, the COUNT(DISTINCT DealType)  in the script part does return 9, so there it does look at NULL values..

View solution in original post

2 Replies
sunny_talwar

Count cannot count nulls, but may be you can try NullCount()

je48746stijn
Contributor III
Contributor III
Author

OK thanks for your reply Sunny. I was not aware that the Count function does not look at Null values.  The NullCount function however does return 0 instead of 9.

Also, the COUNT(DISTINCT DealType)  in the script part does return 9, so there it does look at NULL values..