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: 
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
Partner - Specialist
Partner - Specialist

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
Specialist III
Specialist III

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

Anonymous
Not applicable
Author

you can try Isnull() as well like:

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

jagan
Luminary Alumni
Luminary Alumni

HI,

Try like this

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


Hope this helps you.


Regards,

Jagan.