Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
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
Highlighted
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

Highlighted
Creator
Creator

Super!

I was forgetting about the powerful P and E functions.

many thanks