Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
evgeniystuchalk
Partner - Creator II
Partner - Creator II

'today' condition in set analysis

Hello!

How set 'today' condition in set analysis?

I want to see some measures, related only to current day, without filtering.

This code does nothing.

Count({$<[date]={'=today()'}>} [contactID])

What is wrong?

1 Solution

Accepted Solutions
sunny_talwar

Oops, I missed a parenthesis at the end:

Count({$<[date]={"$(=Date(Today(), 'DD.MM.YYYY'))"}>} [contactID])

View solution in original post

11 Replies
sunny_talwar

Try this:

Count({$<[date]={"$(=Date(Today(), 'DateFieldFormatHere')"}>} [contactID])


Add the date field format in place of this -> DateFieldFormatHere

evgeniystuchalk
Partner - Creator II
Partner - Creator II
Author

nope, it gives null as result. tryed today(), tryed integer number - all with same results

Nicole-Smith

Does your date have a timestamp?

Count({$<[date]={'$(=timestamp(today()))'}>} [contactID])

GabrielAraya
Employee
Employee

mmm I tested with the following instruction without problems .. Sum({<date={"=Today()"}>} contactID) ..

another point is: What is the format of your date field, Is it Date or Timestamp?

sunny_talwar

Check these links to make sure dates are read as dates:

Get the Dates Right

Why don’t my dates work?

And this one to understand how is date used in set analysis:

Dates in Set Analysis

evgeniystuchalk
Partner - Creator II
Partner - Creator II
Author

Is solid Date. 'DD.MM.YYYY'

sunny_talwar

So this didn't work?

Count({$<[date]={"$(=Date(Today(), 'DD.MM.YYYY')"}>} [contactID])

Also, make sure that date is not Date (with upper case D) or DATE (or all upper case) and same is with all your other fields.

GabrielAraya
Employee
Employee

Can you share your QVW file with few records?

evgeniystuchalk
Partner - Creator II
Partner - Creator II
Author

Unfortunately, your formula return null in my case. All syntax is correct, i've double cheked it.