Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Christopher_Lawrence
Contributor III
Contributor III

Inquiry around Now() and comparing with less than/greater than

Im looking to understand how to properly set up a set analysis expression that takes a date field and compares it to the Now() function. I.e, if the date in question is greater than now(), include it towards the count formula I have. (I want to use now() opposed to today() as the time stamp is provided, which my date field provides the results in yyyy-dd-mm hh:mm:ss). I have attempted it, but the set up seems to be rather confusing to me.

 

Any insight would be much appreciated!

Labels (2)
2 Replies
QFabian
Specialist III
Specialist III

Hi @Christopher_Lawrence , please think on dates with time as numbers with decimals.

QFabian_0-1648595125468.png

So, yo can create an expression like this :

count({< Date_Field = {"> $(=num(now()))"} > } Date_Field)

or like this, without set analysis

count(if(Date_Field >= now(), Date_Field))

QFabian
Kashyap_R
Partner - Specialist
Partner - Specialist

Hi

count({< Date_Field = {"> $(=Date(now(),'yyyy-dd-mm hh:mm:ss'))"} > } Date_Field)

hope this helps

Thanks and regards

kashyap.R

Thanks and Regards
Kashyap.R