7 Replies Latest reply: Jun 13, 2016 4:27 PM by Linda Pembroke RSS

    Fields values not specific to selection

    Linda Pembroke


      I'm trying to build some calculations in the back end so that I can just use the field names for the values I need on the front end. However, when I use the field names (For instance, Age64_105Num2) I get the value for the entire population even when I have a specific customer selected. But, when I put in the calculation I used in the script I get the customer-specific value. Anyone know how I can fix this?


      Here is my script:



      LOAD *,

      WeightOfAdjProb65_74_2 * AvgAdjProb_65to74_2 as WeightedCal_74_2,
      WeightOfAdjProb75_84_2 * AvgAdjProb_75to84_2 as WeightedCal_84_2,
      WeightOfAdjProb85_105_2 * AvgAdjProb_85to105_2 as WeightedCal_105_2;


      _PCR2CalcMoYr as _PCR2Calc_KEY,
      Sum(If(AgeFlag=1,NUMERATOR_PCR,0)) as Age64_105Num2,
      Sum(If(AgeFlag74=1,AgeFlag74,0))/sum(AgeFlag) as WeightOfAdjProb65_74_2,
      Sum(If(AgeFlag84=1,AgeFlag84,0))/sum(AgeFlag) as WeightOfAdjProb75_84_2,
      Sum(If(AgeFlag105=1,AgeFlag105,0))/sum(AgeFlag) as WeightOfAdjProb85_105_2,
      Sum(If(AgeFlag74=1,[Average Probability of readmission],0))/Sum(AgeFlag74) as AvgAdjProb_65to74_2,
      Sum(If(AgeFlag84=1,[Average Probability of readmission],0))/Sum(AgeFlag84) as AvgAdjProb_75to84_2,
      Sum(If(AgeFlag105=1,[Average Probability of readmission],0))/Sum(AgeFlag105) as AvgAdjProb_85to105_2

      Resident PCR_DETAILS_HEDIS2016

      Where (Match (_PCR2CalcMoYr, 'PCR2Feb2017'))
      Group By _PCR2CalcMoYr;