Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
annabergendal
Partner - Creator
Partner - Creator

aggr calculation on one dim but display it on another in straight table

I have a calculation that needs to be done aggregating on one key dimension.

This seems to work fine, til I want to display the calculation on another dimension.

=if

(

sum(aggr(Sum (Qty1), %Key))=0

and

sum(aggr(sum(Qty2), %Key))>sum(aggr(sum(Qty3, %Key))

,sum(aggr(Sum (Qty4), %Key))

,0

)

How can I display it on Group dim? I tried to add in the aggr expression but didn't work.

So in the table I would like it to say 13 as a total.

Also I would like to display this in a graph with Group as dim, without the key.

Attached example.

Thanks.

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

HI,

Here is the expression.,

=sum(aggr(if

(

sum(aggr(Sum (Qty1), %Key))=0

and

sum(aggr(sum(Qty2), %Key))>sum(aggr(sum(Qty3), %Key))

,sum(aggr(Sum (Qty4), %Key))

,0

),%Key))

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

2 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

HI,

Here is the expression.,

=sum(aggr(if

(

sum(aggr(Sum (Qty1), %Key))=0

and

sum(aggr(sum(Qty2), %Key))>sum(aggr(sum(Qty3), %Key))

,sum(aggr(Sum (Qty4), %Key))

,0

),%Key))

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
annabergendal
Partner - Creator
Partner - Creator
Author

Thanks!

Works perfect