Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Help with expression

expression.png

am trying to get the total count for [TRX QTY] from the date i select it and the previous date


for example:

Date                                     TRX QTY

01/01/2013                             50

01/02/2013                             40

04/12/2014                             90

05/02/2015                             85

selecting 04/12/2014, the gauge chart calculates the total Items for 04/12/2014  + 01/02/2013 + 01/01/2013  =   180


I try this expression but it doesn't work.


if(yeartodate([Document Date],-1),SUM([TRX QTY]),0)


sum(([TRX QTY])/1)

2 Replies
Not applicable
Author

Hi,

You can try this at scripting itself.

LOAD
F1,
F2,
RangeSum(F2, Peek('CumSum')) AS CumSum;
LOAD * INLINE [
F1, F2
01/01/2013, 10
02/02/2014, 50
03/03/2014, 60
04/04/2015, 20
]
;

Regards,

Sudha


robert_mika
Master III
Master III

Could you attached your file?