Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

sakshikaul
Contributor

Expression error

Hi

This below expression for cumulative sales is not giving correct result

=BELOW(TOTAL(RangeSum(Above(TOTAL Sum( { <Sold_Date= {">=$(From)<=$(To)"} >} [sales price]* quantity_sold)-sum({ <Sold_Date= {">=$(From)<=$(To)"}>}[sales price]* quantity_returns)) , 0, RowNo(TOTAL))))

Paint1.png

7 Replies
sakshikaul
Contributor

Re: Expression error

Please help stalwar1

sushil353
Honored Contributor II

Re: Expression error

Hi Sakshi,

It is better if you can share a sample qvw for the same.

Otherwise in your case you should try the as of calendar for commutative calculations.


HTH

Sushil 

rangam_s
Contributor II

Re: Expression error

Try this

rangesum(above((Sum( { <Sold_Date= {">=$(From)<=$(To)"} >} [sales price]* quantity_sold)-sum({ <Sold_Date= {">=$(From)<=$(To)"}>}[sales price]* quantity_returns)),0,RowNo()))

sakshikaul
Contributor

Re: Expression error

I am not getting correct values

MVP
MVP

Re: Expression error

What are the correct numbers?

sakshikaul
Contributor

Re: Expression error

MRP cumulatve Achevements

966,869.00
3,813,529.00

1246490.30

MVP
MVP

Re: Expression error

Would you be able to share a sample file to check it out?

Community Browser