Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Howdy,
I have an issue where I'm trying to find any patients that have an open referral, that have also had a contact with other particular services, with particular time labels, after their referral date.
I've separated the open referrals by creating a RefClosedDate and having that field = 'NULL' if it's open.
I've tried:
count(
{<
ClientID = P({< Time_Label = {'2 Hours','1 Hour','24 Hours','Trust Default 6 Weeks','48 Hours','1 Working Day','4 Hours'},
Service_Line = {'Alpha','Beta','Delta','Gamma'}
>})
, RefClosedDate = {'NULL'}>}
RefID)
but P() treats the ',' as an 'or' if there is more than 1 expression included within it.
So I tried:
count(
{<
ClientID = P({< Time_Label = {'2 Hours','1 Hour','24 Hours','Trust Default 6 Weeks','48 Hours','1 Working Day','4 Hours'}
>})
-
P({< Service_Line -= {'Alpha','Beta','Delta','Gamma'}
>}ClientID)
, RefClosedDate = {'NULL'}>}
RefID)
but that produces totally incorrect data.
I will then have to bring in the max contact_date of the resultant ClientID's and compare them with the RefDate's of any other referrals they've had, but I'm way, way, away from that stage.
Is there any other way to nest a set within another set in set analysis?
Hi,
It's either a date or the string 'NULL'. I created it to avoid having to search for null's using set analysis in my expressions which is a headache.
Have a look at the following Design Blog post, and I am including the base link to the Design Blog area below that in case you want to search further on your own, there are quite a few Set Analysis related posts, and after that I am including Help link just in case something there that may help, it is pretty extensive.
https://community.qlik.com/t5/Qlik-Design-Blog/A-Primer-on-Set-Analysis/ba-p/1468344
https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog
Sorry I do not have something better for you, but hopefully this may help you get things figured out.
Regards,
Brett