Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

pathompong_vm
New Contributor II

Need help with Expression (Accummulate and sum)

I do Accumulate report by Pivot Chart like this;Untitled.png

I'm stuck with 'Sales_total_accum' => I do in If Clause; If(Accu<=Sales_total_80%,Sum(Sales_All),0).

But no number in 'Total' level, I would like to sum it up. So I need you suggestion and help .You can view my solution in attach.

Thanks.

1 Solution

Accepted Solutions

Re: Need help with Expression (Accummulate and sum)

Try this

=Sum(Aggr(If(RangeSum(Above(Sum(Sales_All), 0, RowNo())) <= Sum(TOTAL <Department, Category> Sales_All)*0.8, Sum(Sales_All), 0), Department, Category, ProductID))

or this if you have QV12

=Sum(Aggr(If(RangeSum(Above(Sum(Sales_All), 0, RowNo())) <= Sum(TOTAL <Department, Category> Sales_All)*0.8, Sum(Sales_All), 0), Department, Category, (ProductID, (NUMERIC))))
2 Replies

Re: Need help with Expression (Accummulate and sum)

Try this

=Sum(Aggr(If(RangeSum(Above(Sum(Sales_All), 0, RowNo())) <= Sum(TOTAL <Department, Category> Sales_All)*0.8, Sum(Sales_All), 0), Department, Category, ProductID))

or this if you have QV12

=Sum(Aggr(If(RangeSum(Above(Sum(Sales_All), 0, RowNo())) <= Sum(TOTAL <Department, Category> Sales_All)*0.8, Sum(Sales_All), 0), Department, Category, (ProductID, (NUMERIC))))
Highlighted
pathompong_vm
New Contributor II

Re: Need help with Expression (Accummulate and sum)

It's working very fine, Thank you so much 🙂