Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sakshikaul
Creator II
Creator II

Cumulative saless

Hi

I have used following expressions for calculating cumulative targets and cumulative sales but the results are not found to be correct

Following are the expressions:-

MRP cummulative achievements

=RangeSum(Above(TOTAL Sum( { <Sold_Date= {">=$(From)<=$(To)"} >} [sales price]* quantity_sold)-

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

Realised  cummulative achieveents

=RangeSum(Above(TOTAL Sum( { < Sold_Date = {">=$(From)<=$(To)"} >}[inv value]/Sales_INR_Unit)), 0, RowNo())

For both the expressions results are coming correct in next row like for eg

SAPCode    MRP cumulative achievements   Realised  cumulative achievements

N230005         949380 (in correct)                        1909675(correct value present in next row )

The correct  values under the heading  ( Realised  cumulative achievements)   are coming in next row ie correct values should be 

1909675 which is present in next row (marked in red color in image )

Want to know where I am going wrong?

please help stalwar1Paint1.png

1 Solution

Accepted Solutions
sunny_talwar

Not entirely sure, but may be you need this

=Below(TOTAL RangeSum(Above(TOTAL Sum({<Sold_Date = {">=$(From)<=$(To)"}>} [inv value]/Sales_INR_Unit)), 0, RowNo()))

View solution in original post

1 Reply
sunny_talwar

Not entirely sure, but may be you need this

=Below(TOTAL RangeSum(Above(TOTAL Sum({<Sold_Date = {">=$(From)<=$(To)"}>} [inv value]/Sales_INR_Unit)), 0, RowNo()))