Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

get the range sum

COMPANYORDATEdealdateqty
A2014/1/22013/12/2030
  2014/1/1010
  2014/2/120
B2014/3/122014/1/540
  2014/3/620
  2014/4/430
  2014/4/1240
  2014/5/150
C2014/4/112014/2/520
  2014/3/630
  2014/4/440
  2014/4/12

50

the COMPANY &ORDATE is fixed data . When I input a date , I want to get the sum(qty)  between  ordate and  input-date for every company.

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

This must work:

sum( {<dealdate={"<=$(=date(testdate))"}>} if(INDATE<dealdate,qty))

regards

Darek

View solution in original post

6 Replies
Not applicable
Author

the sample is as attached.

robert_mika

jack,

Are your data coming from Excel Pivot Table?

Do you have the raw sources of data?

Not applicable
Author

The data is from database .Attached is a actual data which ordate is property of company+item(which compose a key_gobkey).

Not applicable
Author

If you have Company as dimension, then expression:

sum( {<dealdate={"=INDATE<dealdate"}>*<dealdate={"<=$(=date(testdate))"}>} qty)

should work

regards

Darek

Not applicable
Author

it seem no ok . the expressing  dealdate={"=INDATE<dealdate"} don't work . pls see attached.

Not applicable
Author

This must work:

sum( {<dealdate={"<=$(=date(testdate))"}>} if(INDATE<dealdate,qty))

regards

Darek