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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
nicktodd
Creator
Creator

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

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))


View solution in original post

2 Replies
mdmukramali
Specialist III
Specialist III

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
Creator
Creator
Author

Super!

I was forgetting about the powerful P and E functions.

many thanks