Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Highlighted
nicktodd
Contributor

Simple listbox problem

A simple problem that's defeating me. In the attached example I want a listbox to show the number of students who have a particular code and the number of students who don't have that code.

For example, if I'm interested in Code B I want Yes = 3 and No = 4.

I think the solution must be obvious but I'm not seeing it!

Thanks

 

1 Solution

Accepted Solutions
mdmukramali
Valued Contributor III

Re: Simple listbox problem

Hi,
Field Expression:
=if(code='B','Yes','No')

Expression:
=IF(code<>'B', Count({<student=E({1<code={B}>})>}DISTINCT student),Count({<student=P({1<code={B}>})>}DISTINCT student))


2 Replies
mdmukramali
Valued Contributor III

Re: Simple listbox problem

Hi,
Field Expression:
=if(code='B','Yes','No')

Expression:
=IF(code<>'B', Count({<student=E({1<code={B}>})>}DISTINCT student),Count({<student=P({1<code={B}>})>}DISTINCT student))


nicktodd
Contributor

Re: Simple listbox problem

Super!

I was forgetting about the powerful P and E functions.

many thanks