Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count of Null values

Dear Friends,

I would like to display the count of null values of Reason Codes,  like Reason Code it may contains alpha and numeric characters.

the following expression shows hypen only. I don't know where I am making a mistake. Can any one help me.

=If(Isnull([Reason Code]),Count([Reason Code])) .

Regards

Joe

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

This will count both nulls and blanks:
count(if(len(trim([Reason Code]))=0,[Reason Code]))

View solution in original post

7 Replies
SunilChauhan
Champion II
Champion II

hope one of below help

count( if(Isnull([Reason Code]),[Reason Code]))

or

count( if(Isnull([Reason Code])=-1,[Reason Code]))

or

count( if(Isnull([Reason Code])<>0,[Reason Code]))

or

count( if(len([Reason Code])=0,[Reason Code]))

Sunil Chauhan
its_anandrjs
Champion III
Champion III

Hi,

You have to use some thing below

=If( Isnull ( [Reason Code] ) = -1 and  [Reason Code] = 0, Count([Reason Code] ) )

Let me know about this.

Hope this helps

Rgds

Anand

Not applicable
Author

Hello,

Thanks for your help, I tried all the expressions in the above, but still its not working now the result is 0.

In the source Reason Code it may contain either values like alpha and numeric or no value like a empty cell.

I would like to display the count of empty cells.

Regards

Joe

SunilChauhan
Champion II
Champion II

try this

count( if([Reason Code])=' ',[Reason Code]))

or else anand chouhan will help

Sunil Chauhan
Not applicable
Author

Try this ;

SUM(IF([Reason Code]='',1,0))

Anonymous
Not applicable
Author

This will count both nulls and blanks:
count(if(len(trim([Reason Code]))=0,[Reason Code]))

Not applicable
Author

Dear Michael,

Perfect answer, now its working fine..............

Thanks a lot.

Joe