Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
quilldew
Creator
Creator

Union in Set Analysis

Good morning,

This is driving me crazy. I'm sure I've got it right, no idea what is going wrong.

I'm trying to union 2 sets using set analysis.

Here is the code I am using:

count(
{$<
NewReferralDischargeReason-={'Admin Error'}
,ReferralDischargeReason-={'Closed - Admin Error'}
,ArmedForceInd = {'02', '05'}
,DiagnosisCode = {'F43.1'}
>
+
$<NewReferralDischargeReason-={'Admin Error'}
,ReferralDischargeReason-={'Closed - Admin Error'}
,ArmedForceInd = {'02', '05'}
,Diagnosis1 = {'F43.1'}
>}
[KEY Client])

Now this code runs, but gives me a total in the hundreds. When I run each part separately it gives me the correct numbers, each totalling less than 40. The '+' is supposed to represent 'OR' correct? So this code should just give me the union of both sets.

I'm confused. Please help.

1 Solution

Accepted Solutions
Chanty4u
MVP
MVP

may be

count($<NewReferralDischargeReason-={'Admin Error'}
,ReferralDischargeReason-={'Closed - Admin Error'}
,ArmedForceInd = {'02', '05'}
,Diagnosis1 = {'F43.1'}
>}
[KEY Client])

+

count($<NewReferralDischargeReason-={'Admin Error'}
,ReferralDischargeReason-={'Closed - Admin Error'}
,ArmedForceInd = {'02', '05'}
,Diagnosis1 = {'F43.1'}
>}
[KEY Client])

View solution in original post

3 Replies
Chanty4u
MVP
MVP

may be

count($<NewReferralDischargeReason-={'Admin Error'}
,ReferralDischargeReason-={'Closed - Admin Error'}
,ArmedForceInd = {'02', '05'}
,Diagnosis1 = {'F43.1'}
>}
[KEY Client])

+

count($<NewReferralDischargeReason-={'Admin Error'}
,ReferralDischargeReason-={'Closed - Admin Error'}
,ArmedForceInd = {'02', '05'}
,Diagnosis1 = {'F43.1'}
>}
[KEY Client])

quilldew
Creator
Creator
Author

Okay thank you that works, and I've used that to produce totals a thousand times, not sure why I didn't include the count again

Should the version I used not work? I looked through lots of threads on unions in set analysis and that format seems like a common solution.

Chanty4u
MVP
MVP

its not version problem.

check here sunny different solution.

Union in Set Analysis