Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
jblomqvist
Specialist
Specialist

How to do a greater than and less than for date in Set Analysis?

Hi all,

I have the following set analysis expression:

Sum({<OrderDate={'>=01/01/2012'}>}SalesAmount)

How can I add a <= 10/01/2012 to this set analysis?

So the sales should be focused on this date range.

I tried:

Sum({<OrderDate={'>=01/01/2012' '<=10/01/2012}>}SalesAmount) and adding a 'and' to the expression but it didn't work.

6 Replies
Clever_Anjos
Employee
Employee

Sum({<OrderDate={'>=01/01/2012 <=10/01/2012'}>}SalesAmount)


no quotes inside SA

simondachstr
Luminary Alumni
Luminary Alumni

Try Sum({<OrderDate={'>=01/01/2012<=10/01/2012'}>}SalesAmount)

swuehl
MVP
MVP

Try

Sum({<OrderDate={">='01/01/2012'<='10/01/2012'"}>}SalesAmount)

Double quotes for the search and single quotes to prevent QV from interpreting your date as a division.

Not applicable

Hi

Try

This

Sum({<OrderDate={'>=01/01/2012<=10/01/2012'}>}SalesAmount)

qlikviewwizard
Master II
Master II

Hi John, are you able to achieve ?

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

=Sum({<OrderDate={'>=$(=MakeDate(2012, 1, 1))<=$(=MakeDate(2012, 10, 1))'}>}SalesAmount)


OR

=Sum({<OrderDate={">=$(=Date(MakeDate(2012, 1, 1), 'MM/DD/YYYY'))<=$(=Date(MakeDate(2012, 10, 1), 'MM/DD/YYYY'))"}>}SalesAmount)


Hope this helps you.


Regards,

Jagan.