Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Last 2 years of purchases

Hi

I am trying to get the sales of the last 23.5 months (705 days)

This is what I have come up with so far:

sum({<Accumulator_Type={'BILLED','RETAIL'},[Transaction_Date.autoCalendar.Date]={'>=$(=Date(today()-705,&Chr(39)&DD-MM-YYYY&Chr(39)&))'}>}Value-Tax)

The problem is that when I change the number 705 I get the same amount of sales although I shouldn't.

Can anyone help?

Kind Regards

George

1 Solution

Accepted Solutions
sunny_talwar

Try this

Sum({<Accumulator_Type = {'BILLED','RETAIL'}, [Transaction_Date.autoCalendar.Date] = {">=$(=Date(Today() - 705, 'DD-MM-YYYY'))"}>} Value-Tax)

View solution in original post

4 Replies
sunny_talwar

Try this

Sum({<Accumulator_Type = {'BILLED','RETAIL'}, [Transaction_Date.autoCalendar.Date] = {">=$(=Date(Today() - 705, 'DD-MM-YYYY'))"}>} Value-Tax)

Anonymous
Not applicable
Author

Thanks. I tried it but get 0s everywhere

sunny_talwar

Can you share the script for your Derived Calendar?

Anonymous
Not applicable
Author

You are right. It worked. I just had to change the format of the date from DD-MM-YYYY to DD/MM/YYYY