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

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
Former Employee
Former 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: