Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
mbeccaria
Contributor II
Contributor II

Set Analysis Exclude Part of Modifier Set

I am trying to build a set that excludes results based on part of a modifier. Here is my expression:

Count(
{
     (
          <[Program Enrollments.End Date] = {'No Entry'}>
          *
          <[Program Enrollments.Program Name] = {Outpatient,CCBHC}>
          *
          <[Services.Is No Show]={'No'}>
     )
     -
     <[Services.Service Date]= {">=$(=Date(Today()-21,'YYYY-MM-DD'))"}>
}
     [Services.Service Date]
)

I WANT to return clients who are in "Outpatient or CCBHC" programs, are active (thus have no Program End Date), and who have had services where they showed up (Is No Show=No)
BUT if they received a service in the past 21 days, do NOT include them.

So I want ALL users who meet the first three conditions, but REMOVE the users from that set if they have a record that meets the last condition (had a service in the past 21 days).

Can't quite figure it out. Can you help?

1 Solution

Accepted Solutions
stevejoyce
Specialist II
Specialist II

Count(
{
     <
          [Program Enrollments.End Date] = {'No Entry'},
        
          [Program Enrollments.Program Name] = {'Outpatient','CCBHC'},
         
          [Services.Is No Show]={'No'}
     >
     -
     <[Services.Service Date]= {">=$(=Date(Today()-21,'YYYY-MM-DD'))"}>
}
     [Services.Service Date]
)

View solution in original post

1 Reply
stevejoyce
Specialist II
Specialist II

Count(
{
     <
          [Program Enrollments.End Date] = {'No Entry'},
        
          [Program Enrollments.Program Name] = {'Outpatient','CCBHC'},
         
          [Services.Is No Show]={'No'}
     >
     -
     <[Services.Service Date]= {">=$(=Date(Today()-21,'YYYY-MM-DD'))"}>
}
     [Services.Service Date]
)