Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

aggregation prob

hey i am getting this messgae while trying to run the script below the image:

aggregation prob.PNG

[Trans]:

LOAD [DOC],

[PART],

[QUANT]

FROM [lib://clinton/Trans.qvd]

(qvd);

load DOC , PART

from [lib://clinton/Trans.qvd]

(qvd)

GROUP BY "DOC"

;

Tags (1)
1 Solution

Accepted Solutions
balrajahlawat
Esteemed Contributor

Re: aggregation prob

You are using Group BY:

Two things:

1) It shud be used with aggregate function like sum(),count() etc

2) It will work on REsident load

Hope this will help!!

3 Replies

Re: aggregation prob

The error Aggregation expression required by GROUP BY clause means exactly that. If you use a GROUP BY then there must be an aggregation expression in the load. You need to add an aggregation expression so that something can be grouped. For example:

load DOC , Sum(PART) as SumOfParts

from [lib://clinton/Trans.qvd]

(qvd)

GROUP BY "DOC"

;


talk is cheap, supply exceeds demand
marcus_malinow
Valued Contributor II

Re: aggregation prob

Hi Jhonatan,

looking at the second LOAD statement, you have a GROUP BY clause, but are not specifying what aggregation you are trying to perform.

LOAD

    DOC,

    minstring(PART) as PART

from [lib://clinton/Trans.qvd]

(qvd)

GROUP BY DOC;

;

This would work, but isn't necessarily what you are trying to achieve.

What aggregation are you trying to perform here?

Marcus

balrajahlawat
Esteemed Contributor

Re: aggregation prob

You are using Group BY:

Two things:

1) It shud be used with aggregate function like sum(),count() etc

2) It will work on REsident load

Hope this will help!!