Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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: