Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
linhphuong
Contributor II
Contributor II

Set analysis date range

I have an issue with date range in set analysis. I have checked many an examples on qlikhelp but none seem to work.

I have 3 columns Amount, Date2 and Date3 and I want to sum the amounts for all Date3 that is between 30 and 15 days before date2.

My expression is following:

sum({<Date3={">=$(Date2-30)<=$(Date2-15)"}>} -Amount)

And the Dimension is Date2

Thanks for reply

2 Replies
quriouss
Creator III
Creator III

Does this work (insert an extra = before the Date2)?


Sum({$<Date3={">=$(=Date2-30)<=$(=Date2-15)"}>}Amount)

linhphuong
Contributor II
Contributor II
Author

Hi,

The solution was to convert the date from numeric to date type.

Thank you for reply