Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
YashPatel0106
Partner - Contributor II
Partner - Contributor II

Error in Cumulative Sum in Qliksense Table

Hi All,

I am facing some issue while calculating cumulative sum in Qliksense Table.

Following is the expression :

Sum(Aggr(RangeSum(Above(If(Column(5)='No'
,0,If(OrderDate=Date(BillDate,'DD-MM-YYYY'),Sum(OrderQty)-Sum(BilledQty),Sum(OrderQty))),0, RowNo())),DepotCode,MaterialNo,OrderDate,Key))

where Column(5) is the inscope column 

InkedCapture_LI.jpg

Expected Cumulative Remaining Qty
0
0
3

8

 

Please give your valuable feedback and Thanks in Advance.

 

Regards,

Yash P.

 

Labels (2)
11 Replies
YashPatel0106
Partner - Contributor II
Partner - Contributor II
Author

Order Date : 23-09-2019
Depot Code : 202
Material Code : 14053701020000

Other Ex 

Same order date and depot code
Material Code : 21182414001000 , 14053701005000

YashPatel0106
Partner - Contributor II
Partner - Contributor II
Author

The issue got solved.

Used Sorting in AGGR.

(Aggr(RangeSum(Above( Sum(RemainingQty), 0, RowNo(TOTAL))),(DepotCode,TEXT,ASCENDING),(MaterialNo,TEXT,ASCENDING),(OrderDate,Numeric,ASCENDING),(Key,Text,ASCENDING)))

 

Thanks For Your Support.