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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

aggregate functions with group by clause in load statement

hi

can we use aggregate functions in load statement if so how to use these functions with group by clause in load statement...?

and where we can use these functions?

2 Replies
Not applicable
Author

in script--

load

id,

sum(sales) as sales

group by id;

------------------------------

in expression

Aggr(sum(sales),id)

er_mohit
Master II
Master II

In script aggrgation function is like a group by function

on expression side we use aggr function

for calculation like eg:

you have 3 dimensions and 2 expression in pivot or straight table then your ist expression gives the data correct on the basis od 1st dimension .by default it gives hte data on the basis of all dimension menas 3

to caluculate forcefully you have to use aggr function like this way

aggr(sum(Expression),Dimension1)

but in script side use Group by statement to extract the data of some calculation on the basis of particular field

like this

load a,

min(c) as Minimumvaluec

from table

group by a;

see the attached example and i use first sorted value concept in  that