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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
renjithpl
Specialist
Specialist

counting only second scenario

I have two fields A and B,

I want to say if A and B are null, then say 'no', and then if B is filled with data and if A is blank then, say 'yes'

And finally I want the count of only 'yes'

i used the below formula

=If(IsNull(A & B), 'no', Count(If(IsNull(A), 'yes')))

fyi... the first condition is must i cant ommit (If(IsNull(A & B), 'no')

But its showing the data of both no and yes.

can any one help me..

3 Replies
Anonymous
Not applicable

Could also do something like the following.


sum( If ( IsNull(A) and IsNull(B), 0, if ( IsNull(A),1) ) )


rgrds

Anita

renjithpl
Specialist
Specialist
Author

hey cool dude... it works..thanks a lot

SunilChauhan
Champion II
Champion II

hi,

hope this will work

If(IsNull(a & b), 'no',Count(If(IsNull(a), -1,'yes')))

gud luck

Sunil Chauhan