Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Count

Hi

I want to count two fields of same variable and hence using the expression given below but its not working. What is wrong with the expression. Note the second field is a null.

Count({<Status = {'Result Awaited'},Status = {''}>} Status)

4 Replies
jpapador
Valued Contributor

Re: Count

multiple values in the same field are seperated by commas for example:

Count({<Status = {'Value1', 'Value2'}>} Status)

However NULL values don't work well in set analysis so you are better off making a flag in the script:

If(Len(Status) = 0 or Status = 'Result Awaited', 1, 0) as StatusFlag

You expression would look like:

Count({<StatusFlag= {1}>} Status)

gautik92
Valued Contributor III

Re: Count

Sum(if(Len(Status)=0 or Status ='Result Awaited',1,0))

balrajahlawat
Esteemed Contributor

Re: Count

you can try Isnull() as well like:

=if(isnull(Status) or Status='Result Awaited',count(Status))

MVP
MVP

Re: Count

HI,

Try like this

Count({<Status = {'Result Awaited'}> + <Status -= {'*'}>} Status)


Hope this helps you.


Regards,

Jagan.