Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

how to sum by group?

Hi guys,


I met one problem, how to obtain each group's sum, and to save this sum as one field in script.

The scenario is I need to monitor each group's quantity, once it exceeds one value(like 2 as below), the system will send alert.

Thank you very much!

groupquantity
A1
A2
B2
C3
Tags (2)
1 Solution

Accepted Solutions
greeshma_k
Contributor III

Re: how to sum by group?


load  group,

        sum(quantity)

from tablename

group by group;

2 Replies
greeshma_k
Contributor III

Re: how to sum by group?


load  group,

        sum(quantity)

from tablename

group by group;

amit_saini
Honored Contributor III

Re: how to sum by group?

Jack,

Try this:

max(aggr(sum(quantity),group))

Thanks,

AS

Community Browser