
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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])

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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])

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
