Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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?

 

1 Solution

Accepted Solutions
Highlighted

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)

View solution in original post

3 Replies
Highlighted

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)

View solution in original post

Highlighted
Contributor II
Contributor II

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

Thank you for the solution. It worked!!

Highlighted

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)