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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
wgonzalez
Partner - Creator
Partner - Creator

"Script Error", why?

Hi,

I want to summarize transactions in a resident table, but I'm getting the "Script Error" message and can't identify the cause.  Could someone help?  See the script below.

Thanks.

 

/* Summarized Attendance Data */

AttTemp:
LOAD DTPunchDate as PunchDate,
ParentTrans as ParentT,
AttCategory as AttCat,
AttHours as AttH,
Date(monthstart(DTPunchDate), 'MMM-YYYY') AS
MonthYear
Resident AttTrans
Order By DTPunchDate asc;

/* Summarizes Attendance Transactions. Used for charts showing annual info per month. */
AttSumm:
LOAD MonthYear,
ParentT as ParentTr,
AttCat as AttCateg,
sum(AttH) as AttHoursSumm
Resident AttTemp
Group By MonthYear, ParentT;
//Order By MonthYear, ParentT asc;

//DROP Table AttTemp;

Capture.JPG

1 Solution

Accepted Solutions
swuehl
MVP
MVP

You need to either add AttCat to your group by field list or use an aggregation function with AttCat:

No other fields than the aggregation fields may be used outside aggregation functions in the loaded expressions.

View solution in original post

2 Replies
swuehl
MVP
MVP

You need to either add AttCat to your group by field list or use an aggregation function with AttCat:

No other fields than the aggregation fields may be used outside aggregation functions in the loaded expressions.

wgonzalez
Partner - Creator
Partner - Creator
Author

Thanks!  It worked!