Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Highlighted
quilldew
Contributor

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
Esteemed Contributor III

Re: Union in Set Analysis

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
Esteemed Contributor III

Re: Union in Set Analysis

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

quilldew
Contributor

Re: Union in Set Analysis

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
Esteemed Contributor III

Re: Union in Set Analysis

its not version problem.

check here sunny different solution.

Union in Set Analysis