Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

baylor2016
Contributor

Can I do this using pure set analysis insteading using aggr function?

Hi,

I used this expression to get number of patients whose test value is more than 190. Can I use pure set analysis and count to get this number? If it can be done, I will be able to use union for more calculation.

=sum(

if (AGGR(

FirstSortedValue(

{<

YearMonth,

FLAG_DM={1},

CONTACT_DATE2 = {"$(='>=' & Date(V_selectedDate_1YearAgo) & '<=' & Date(V_selectedDate))"},

PAT_ID = {"=Age(Num(V_selectedDate), Only({<YearMonth>}BIRTH_DATE)) >= 21"},

            COMPONENT_ID= {5577,1557762,1578329},

            LABORDERDATE2 = {"$(='>=' & Date(V_selectedDate_1YearAgo) & '<=' & Date(V_selectedDate))"},

            LABRESULT={'*'}  

>}

LABRESULT, -CONTACT_DATE), PAT_ID

)>=190, 1,0)

)

Thanks

1 Reply
robin_hausdoerfer
Valued Contributor III

Re: Can I do this using pure set analysis insteading using aggr function?

I don't think so..., because you calculate every firstsortedvalue() per PAT_ID

Perhaps you could do the calculation in script but then the calculation will be fixed....