Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

prieper
Honored Contributor II

AGGR and Sum multiple values

Hi,

as per the attached example I do not get the correct result: I would like to show (in a text-box) the SUM(Val) for those records, where Amount is < 0.

Within this example it should be 7 (2 plus 5). Think that it is linked with some multiple values for Dim1 and Dim2.

Can someone guide me the right way?

Peter

Tags (2)
1 Solution

Accepted Solutions
Highlighted
MVP
MVP

Re: AGGR and Sum multiple values

try this

=SUM(IF(AGGR(SUM(Amt), Dim1, Dim2) < 0, aggr(sum(Vol),Dim1,Dim2)))

5 Replies

Re: AGGR and Sum multiple values

=SUM({<Dim1 = {"=SUM(Amt)<0"}>}Vol)

Highlighted
MVP
MVP

Re: AGGR and Sum multiple values

try this

=SUM(IF(AGGR(SUM(Amt), Dim1, Dim2) < 0, aggr(sum(Vol),Dim1,Dim2)))

Not applicable

Re: AGGR and Sum multiple values

Can someone please give an explanation around solution provided by Manish

-Qlikuser

prieper
Honored Contributor II

Re: AGGR and Sum multiple values

Thanks for Manish and Massimo for the fast response, both formulas are working.

Peter

Re: AGGR and Sum multiple values

Dim1 and Dim2 are already in DImension Tab so no need to keep in expression with Aggr Function.

=SUM({<Dim1 = {"=SUM(Amt)<0"}>}Vol)

The above will load only those SUM(Vol) for Dim1 for which SUM(Amt) > 0.

Community Browser