Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
avastani
Partner - Creator III
Partner - Creator III

Set Analysis Multiple Range Search

I saw a post on set analysis with range search posting the answer as

SUM({$<MOTRenewal={">$(=Today())<=$(=(Date(Today()+14)))"}>} FieldToAggregate))


My question is what if I have multiple date ranges that are not continuous. Do I just use a comma to separate and add the other ranges or do I have to do a + SUM() with the other ranges?

thanks in advance

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

I believe you just use a + to do the union of two different sets of values, like this:

sum({<MOTRenewal={">=$(=start of first range) <=$(=end of first range)}
+{">=$(=start of second range) <=$(=end of second range)}>}FieldToAggregate)

View solution in original post

2 Replies
johnw
Champion III
Champion III

I believe you just use a + to do the union of two different sets of values, like this:

sum({<MOTRenewal={">=$(=start of first range) <=$(=end of first range)}
+{">=$(=start of second range) <=$(=end of second range)}>}FieldToAggregate)

avastani
Partner - Creator III
Partner - Creator III
Author

that does the trick