Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

expression help

Hi,

Can anyone help highlight what the expression needs to be to count 'Information Refused', and 'Prefer not to say'. The below expression works individually (i.e Count (if (([Religion]) = 'Information Refused',[Client No])) ) but not when I try and put them together:

Count (if (([Religion]) = 'Information Refused', 'Prefer not to say',[Client No]))

The data is below so the result of the expression should be 596.

religion 3.PNG

Appreciate any help on the expression.

1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: expression help

Try Count (if ([Religion] = 'Information Refused' OR [Religion] 'Prefer not to say',[Client No]))


Or better yet use this: Count ({<[Religion] = {'Information Refused','Prefer not to say'}>} [Client No])


talk is cheap, supply exceeds demand

View solution in original post

6 Replies
MVP & Luminary
MVP & Luminary

Re: expression help

Try Count (if ([Religion] = 'Information Refused' OR [Religion] 'Prefer not to say',[Client No]))


Or better yet use this: Count ({<[Religion] = {'Information Refused','Prefer not to say'}>} [Client No])


talk is cheap, supply exceeds demand

View solution in original post

Re: expression help

Try,

Count ({<[Religion] = {'Information Refused', 'Prefer not to say'}>}[Client No])

Chanty4u
Esteemed Contributor III

Re: expression help

=Count (if{<([Religion] = {'Information Refused'}, or  '{[Prefer not to say] }'>},[Client No]))

Re: expression help

Count (if (match([Religion], 'Information Refused', 'Prefer not to say'),[Client No]))

Not applicable

Re: expression help

We also need to calculate value present, which is all information on religion - 'Information Refused',' Prefer not to say' and 'NULL'. This is the existing expression which works but only currently brings through NULL:

Count (Religion) - Count (if (Religion= 'NULL',[Client No]))

How can expression be amended to bring through all 3 categories?

MVP & Luminary
MVP & Luminary

Re: expression help

Just add it to the list: Count ({<[Religion] = {'Information Refused','Prefer not to say','NULL'}[Client No])


talk is cheap, supply exceeds demand