Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have been looking at posts regarding AGGR() and have found them to be very helpful.
I am having an issue with my function and looking for some help:
if
(MEASURE_NAME='CHILDHOOD IMMUNIZATIONS: COMBINATION' AND CARRIER='BCN',
SUM(if(AGGR( Sum (NUMERATOR), MEASURE_NAME, PATIENT_ID)>5,1,0)),
Sum (NUMERATOR))
The above function workd great when I select a carrier. When I select BCN carrier I get Numerator= 478 Denominaor=733. If I select any other carrier I get similar valid looking results. When I unselect the carrier, I get:
Numerator: 4023
Denominator: 859
I would have expected to see BCN+ All other Carriers= total Which is 478+106 = 584 for the numerator.
Any thoughts why this is functioning this way? Or better question, how do I get it to show 584?
Details: For BCN I have 6 numerators which need to be summed up if they are >5 then this counts for 1 measure any number less than 6 gets a 0. For the other carriers, the rollup already happens and I only need to sum up the numerators. I can differentiate which measure goes with each carrier and I have patient level detail information that I can see for the calculation. I have control over the data model so all options should be on the table if that is helpful.
Just looking for any feedback on the AGGR() function and why I get it to work with a filter but not without.
Hi,
Please attach sample file.
Regards,
Udit