Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Nefertary
New 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?

 

1 Solution

Accepted Solutions

Re: Average and gourp by with where clause in Load script

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;

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
3 Replies

Re: Average and gourp by with where clause in Load script

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;

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
Nefertary
New Contributor II

Re: Average and gourp by with where clause in Load script

Thank you for the solution. It worked!!

Re: Average and gourp by with where clause in Load script

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

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)