Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Nefertary
Contributor II
Contributor II

Average and gourp by with where clause in Load script

Hi Guru,

I Have created below script:

Capture.PNG

 

However It keeps giving me error:

Capture2.PNG

 

Can anyone help?

 

Labels (4)
1 Solution

Accepted Solutions
Anil_Babu_Samineni

You missed Non aggregate fields in Group By statement

Test:
LOAD Year_CattleSL,
week_No_CattleSL,
Avg(USDA_meat_prod) as Avg
FROM
Help.xlsx
(ooxml, embedded labels, table is Sheet1) Where Year_CattleSL=2016 Group By Year_CattleSL, week_No_CattleSL;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

3 Replies
Anil_Babu_Samineni

You missed Non aggregate fields in Group By statement

Test:
LOAD Year_CattleSL,
week_No_CattleSL,
Avg(USDA_meat_prod) as Avg
FROM
Help.xlsx
(ooxml, embedded labels, table is Sheet1) Where Year_CattleSL=2016 Group By Year_CattleSL, week_No_CattleSL;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Nefertary
Contributor II
Contributor II
Author

Thank you for the solution. It worked!!

Anil_Babu_Samineni

Great !! Please flag the correct answer If that resolved.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful