Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
Contributor

Selecting People Based on Ever having a value

I need to be able to filter patients based on if they ever had a certain type of value in their past, not whether they currently do. Here is some sample data. I would like to have this done in the GUI and not within the script since I need the rest of the data for other analyses.

The result should return all rows for the first two patients and nothing for the last one if they ever had an Evaluation.

  

MRN_IDVisit Type
33423Eval
33423Therapy
33423Therapy
23453Therapy
23453Eval
23453Therapy
23453Therapy
23453Therapy
423Therapy
423Therapy
423Therapy
1 Solution

Accepted Solutions
Highlighted
MVP & Luminary
MVP & Luminary

Re: Selecting People Based on Ever having a value

See attached example


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Highlighted
MVP & Luminary
MVP & Luminary

Re: Selecting People Based on Ever having a value

See attached example


talk is cheap, supply exceeds demand

View solution in original post

Highlighted
Contributor

Re: Selecting People Based on Ever having a value

Thanks, can you please explain what this is doing?

sum({<MRN_ID=P({<[Visit Type]={'Eval'}>}MRN_ID)>}1)

Highlighted
MVP & Luminary
MVP & Luminary

Re: Selecting People Based on Ever having a value

It returns the sum of 1 for every record that involves a patient that ever had a visit of the type Eval.


talk is cheap, supply exceeds demand
Highlighted
Contributor

Re: Selecting People Based on Ever having a value

Great! How can I put this into a Listbox to select these?

Highlighted
MVP & Luminary
MVP & Luminary

Re: Selecting People Based on Ever having a value

Use two listboxes. One for Visit Type and one for MRN_ID. Then select Eval in the Visit Type listbox. Next right click the MRN_ID listbox and choose the Select Possible option from the context menu. Finally right click the Visit Type listbox and choose the Clear option from the context menu.


talk is cheap, supply exceeds demand