Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Resident load failing - why?

Hi All

I have the following code to caculate the stdev based on a count of distinct Epinums:

 

Stdev1a:
LOAD cResItemName,
  Sum(TotalCost) as sumTotal,
  count(distinct Epinum) as countEpinum
FROM
datasources\QlikviewReport1.qvd
(qvd)
GROUP BY cResItemName;

Stdev1:
LOAD cResItemName,
  stdev(sumTotal/countEpinum) as zz_Chk_StDev_Epinum
RESIDENT Stdev1a;

DROP TABLE Stdev1a;

But the script fails with this cryptic message (at least to me!):

 

zz_Chk_StDev_Epinum,

Stdev1:

LOAD cResItemName,

  stdev(sumTotal/countEpinum) as zz_Chk_StDev_Epinum

RESIDENT Stdev1a

Please could anyone point out what's wrong with my script?

Thanks

Dom

1 Solution

Accepted Solutions
stephencredmond
Partner - Specialist II
Partner - Specialist II

Hi Dom,

When you calculate your Stdev, this is also a grouping so you are going to need "Group By cResItemName" after the "RESIDENT Stdev1a".

Regards,

Stephen

View solution in original post

2 Replies
stephencredmond
Partner - Specialist II
Partner - Specialist II

Hi Dom,

When you calculate your Stdev, this is also a grouping so you are going to need "Group By cResItemName" after the "RESIDENT Stdev1a".

Regards,

Stephen

Not applicable
Author

That's great, thanks Stephen.