Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to write a set analysis for sql between function

I have from date and to date multiselect fileds and i want to show orders between these two date's. How to write it in set analysis?

3 Replies
NickHoff
Specialist
Specialist

You don't need set analysis, you could use interval match, see the following post.

http://community.qlik.com/blogs/qlikviewdesignblog/2013/04/04/intervalmatch

JonnyPoole
Employee
Employee

Interval match is the more elegant way to do it. 

If you have other reasons, you can capture your FROM and TO dates as variables  ex:

vFromDate:   =min([FromDate])

vToDate:        min([ToDate])

And then in your expression write the SET statement like this:

sum(   {$<[OrderDate={'>=$(vFromDate)<=$(vToDate)'}>}   OrderAmount )

Not applicable
Author

Hi,

sum(   {$<[OrderDate={'>=$('start date'<='end date)}>}   OrderAmount: