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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

cumulative ?

HI All,

Account          Due Date               Amount

Furniture          29-Dec-13          500

Furniture          29-Dec-13          600

Sun                 29-Dec-13          200

Sun                 29-Dec-13          800

Sun                 12-Jan-14          900

Sun                 24-Mar-14          800

Sun                 12-Dec-14          1200

Trophe            30-Dec-13          500

Trophe            30-Dec-13          500

If i am Selecting the Account then Sum of Amount Should come...

I need to calculate Sum(Amount) * (if(Today-DueDate)>0,Today-DueDate,0)....

I am getting Furniture & Trophe,Sum of Amount is coming, becoz they done transactions on the same date..

But If I am Selecting Sun, I am getting Zero becz transaction have done on various dates(Needed Cumulative I think So)...

Can any one help me on this....

Regards,

Heather

3 Replies
its_anandrjs
Champion III
Champion III

Try this one

Sum(Amount) * (if( Interval( Floor(date(Today(),'DD-MMM-YYYY')) - Floor(Date(DueDate,'DD-MMM-YYYY')),'DD' ) > 0, Floor(date(Today(),'DD-MMM-YYYY')) - Floor(Date(DueDate,'DD-MMM-YYYY')), 0 ))

Or

Sum(Amount) * (if( Interval( Floor(date(Today(),'DD-MMM-YYYY')) - Floor(Date(DueDate,'DD-MMM-YYYY')),'DD' ) > 0,

Interval( Floor(date(Today(),'DD-MMM-YYYY')) - Floor(Date(DueDate,'DD-MMM-YYYY')),'DD') , 0 ))

Regards

Anand

Not applicable
Author

If I am Selecting Sun (Account) , I am getting zero...

tresesco
MVP
MVP

Not sure if got it right. Try like:

Sum(Amount) * Sum(if(Today-DueDate)>0,Today-DueDate,0))....