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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. 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
Specialist III
Specialist III

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
Partner - Champion III
Partner - Champion III

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.