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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set Analysis Intersection

I have a fairly complex data set that I have simplified into the table below.

PatientFillDateFillDateWeek
a9/1/20168/29/2016
b9/2/20168/29/2016
c9/3/20168/29/2016
a10/1/20169/26/2016
b10/2/20169/26/2016

I want to count the patients that had a fill in the first action week and had a fill in the remainder of the data.

In the example above, i would want the result to be 2.

count({<FillDateWeek = {'$(vMinFillWeek)'}>*<FillDateWeek -= {'$(vMinFillWeek)'}>}distinct Patient)

Where vMinFillWeek = min(FillDateWeek)

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try this: count({<FillDateWeek = {'$(vMinFillWeek)'}, Patient={"=count(distinct FillDate)>1"}>}distinct Patient)


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try this: count({<FillDateWeek = {'$(vMinFillWeek)'}, Patient={"=count(distinct FillDate)>1"}>}distinct Patient)


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Thanks! This worked perfectly.