Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

byrnel0586
Contributor

"Unknown" Load Error

Hi,

I am trying to load the following script and am getting an "Unknown" error. The script will run if I comment the concatenated table, but I need to be able to add a new table for each month. Also, before I added the _PCR2Calc_KEY field, the two tables concatenated fine... Does anyone know what might be wrong?

Thanks.

PCR_Calc:

LOAD *,

WeightOfAdjProb65_74 * AvgAdjProb_65to74 as WeightedCal_74,
WeightOfAdjProb75_84 * AvgAdjProb_75to84 as WeightedCal_84,
WeightOfAdjProb85_105 * AvgAdjProb_85to105 as WeightedCal_105;


LOAD

_PCR2CalcMoYr as _PCR2Calc_KEY,
Sum(If(AgeFlag=1,NUMERATOR_PCR,0)) as Age64_105Num,
Sum(AgeFlag74)/Sum(AgeFlag) as WeightOfAdjProb65_74,
Sum(AgeFlag84)/Sum(AgeFlag) as WeightOfAdjProb75_84,
Sum(AgeFlag105)/Sum(AgeFlag) as WeightOfAdjProb85_105,
Sum(If(AgeFlag74=1,[Average Probability of readmission],0))/Sum(AgeFlag74) as AvgAdjProb_65to74,
Sum(If(AgeFlag84=1,[Average Probability of readmission],0))/Sum(AgeFlag84) as AvgAdjProb_75to84,
Sum(If(AgeFlag105=1,[Average Probability of readmission],0))/Sum(AgeFlag105) as AvgAdjProb_85to105


Resident PCR_DETAILS_HEDIS2016

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


Concatenate PCR_Calc:

LOAD *,

WeightOfAdjProb65_74 * AvgAdjProb_65to74 as WeightedCal_74,
WeightOfAdjProb75_84 * AvgAdjProb_75to84 as WeightedCal_84,
WeightOfAdjProb85_105 * AvgAdjProb_85to105 as WeightedCal_105;


LOAD

_PCR2CalcMoYr as _PCR2Calc_KEY,
Sum(If(AgeFlag=1,NUMERATOR_PCR,0)) as Age64_105Num,
Sum(AgeFlag74)/Sum(AgeFlag) as WeightOfAdjProb65_74,
Sum(AgeFlag84)/Sum(AgeFlag) as WeightOfAdjProb75_84,
Sum(AgeFlag105)/Sum(AgeFlag) as WeightOfAdjProb85_105,
Sum(If(AgeFlag74=1,[Average Probability of readmission],0))/Sum(AgeFlag74) as AvgAdjProb_65to74,
Sum(If(AgeFlag84=1,[Average Probability of readmission],0))/Sum(AgeFlag84) as AvgAdjProb_75to84,
Sum(If(AgeFlag105=1,[Average Probability of readmission],0))/Sum(AgeFlag105) as AvgAdjProb_85to105


Resident PCR_DETAILS_HEDIS2016

Where (Match (_PCR2CalcMoYr, 'PCR2Jan2017'));

1 Solution

Accepted Solutions

Re: "Unknown" Load Error

This is what m w‌ meant:

PCR_Calc:

LOAD *,

WeightOfAdjProb65_74 * AvgAdjProb_65to74 as WeightedCal_74,
WeightOfAdjProb75_84 * AvgAdjProb_75to84 as WeightedCal_84,
WeightOfAdjProb85_105 * AvgAdjProb_85to105 as WeightedCal_105;

LOAD _PCR2CalcMoYr as _PCR2Calc_KEY,
Sum(If(AgeFlag=1,NUMERATOR_PCR,0)) as Age64_105Num,
Sum(AgeFlag74)/Sum(AgeFlag) as WeightOfAdjProb65_74,
Sum(AgeFlag84)/Sum(AgeFlag) as WeightOfAdjProb75_84,
Sum(AgeFlag105)/Sum(AgeFlag) as WeightOfAdjProb85_105,
Sum(If(AgeFlag74=1,[Average Probability of readmission],0))/Sum(AgeFlag74) as AvgAdjProb_65to74,
Sum(If(AgeFlag84=1,[Average Probability of readmission],0))/Sum(AgeFlag84) as AvgAdjProb_75to84,
Sum(If(AgeFlag105=1,[Average Probability of readmission],0))/Sum(AgeFlag105) as AvgAdjProb_85to105

Resident PCR_DETAILS_HEDIS2016

Where (Match (_PCR2CalcMoYr, 'PCR2Feb2017'))

Group By _PCR2CalcMoYr;

Concatenate PCR_Calc:

LOAD *,

WeightOfAdjProb65_74 * AvgAdjProb_65to74 as WeightedCal_74,
WeightOfAdjProb75_84 * AvgAdjProb_75to84 as WeightedCal_84,
WeightOfAdjProb85_105 * AvgAdjProb_85to105 as WeightedCal_105;

LOAD _PCR2CalcMoYr as _PCR2Calc_KEY,
Sum(If(AgeFlag=1,NUMERATOR_PCR,0)) as Age64_105Num,
Sum(AgeFlag74)/Sum(AgeFlag) as WeightOfAdjProb65_74,
Sum(AgeFlag84)/Sum(AgeFlag) as WeightOfAdjProb75_84,
Sum(AgeFlag105)/Sum(AgeFlag) as WeightOfAdjProb85_105,
Sum(If(AgeFlag74=1,[Average Probability of readmission],0))/Sum(AgeFlag74) as AvgAdjProb_65to74,
Sum(If(AgeFlag84=1,[Average Probability of readmission],0))/Sum(AgeFlag84) as AvgAdjProb_75to84,
Sum(If(AgeFlag105=1,[Average Probability of readmission],0))/Sum(AgeFlag105) as AvgAdjProb_85to105

Resident PCR_DETAILS_HEDIS2016

Where (Match (_PCR2CalcMoYr, 'PCR2Jan2017'))

Group By _PCR2CalcMoYr;

6 Replies

Re: "Unknown" Load Error

The syntax to concatenate is like this:

Concatenate (PCR_Calc)

intead of this:


Concatenate PCR_Calc:

byrnel0586
Contributor

Re: "Unknown" Load Error

Thank you, but I'm still getting the error... concatenating was working fine before I added this field: _PCR2CalcMoYr as _PCR2Calc_KEY

mwoolf
Honored Contributor II

Re: "Unknown" Load Error

Sum without Group By

byrnel0586
Contributor

Re: "Unknown" Load Error

The calculations are working fine. The error began after I added this field to both tables: _PCR2CalcMoYr as _PCR2Calc_KEY,

Re: "Unknown" Load Error

This is what m w‌ meant:

PCR_Calc:

LOAD *,

WeightOfAdjProb65_74 * AvgAdjProb_65to74 as WeightedCal_74,
WeightOfAdjProb75_84 * AvgAdjProb_75to84 as WeightedCal_84,
WeightOfAdjProb85_105 * AvgAdjProb_85to105 as WeightedCal_105;

LOAD _PCR2CalcMoYr as _PCR2Calc_KEY,
Sum(If(AgeFlag=1,NUMERATOR_PCR,0)) as Age64_105Num,
Sum(AgeFlag74)/Sum(AgeFlag) as WeightOfAdjProb65_74,
Sum(AgeFlag84)/Sum(AgeFlag) as WeightOfAdjProb75_84,
Sum(AgeFlag105)/Sum(AgeFlag) as WeightOfAdjProb85_105,
Sum(If(AgeFlag74=1,[Average Probability of readmission],0))/Sum(AgeFlag74) as AvgAdjProb_65to74,
Sum(If(AgeFlag84=1,[Average Probability of readmission],0))/Sum(AgeFlag84) as AvgAdjProb_75to84,
Sum(If(AgeFlag105=1,[Average Probability of readmission],0))/Sum(AgeFlag105) as AvgAdjProb_85to105

Resident PCR_DETAILS_HEDIS2016

Where (Match (_PCR2CalcMoYr, 'PCR2Feb2017'))

Group By _PCR2CalcMoYr;

Concatenate PCR_Calc:

LOAD *,

WeightOfAdjProb65_74 * AvgAdjProb_65to74 as WeightedCal_74,
WeightOfAdjProb75_84 * AvgAdjProb_75to84 as WeightedCal_84,
WeightOfAdjProb85_105 * AvgAdjProb_85to105 as WeightedCal_105;

LOAD _PCR2CalcMoYr as _PCR2Calc_KEY,
Sum(If(AgeFlag=1,NUMERATOR_PCR,0)) as Age64_105Num,
Sum(AgeFlag74)/Sum(AgeFlag) as WeightOfAdjProb65_74,
Sum(AgeFlag84)/Sum(AgeFlag) as WeightOfAdjProb75_84,
Sum(AgeFlag105)/Sum(AgeFlag) as WeightOfAdjProb85_105,
Sum(If(AgeFlag74=1,[Average Probability of readmission],0))/Sum(AgeFlag74) as AvgAdjProb_65to74,
Sum(If(AgeFlag84=1,[Average Probability of readmission],0))/Sum(AgeFlag84) as AvgAdjProb_75to84,
Sum(If(AgeFlag105=1,[Average Probability of readmission],0))/Sum(AgeFlag105) as AvgAdjProb_85to105

Resident PCR_DETAILS_HEDIS2016

Where (Match (_PCR2CalcMoYr, 'PCR2Jan2017'))

Group By _PCR2CalcMoYr;

byrnel0586
Contributor

Re: "Unknown" Load Error

Ohh I see. I'm new to this and have taken over someone else's app... thank you both!!

Community Browser