11 Replies Latest reply: Apr 19, 2016 4:51 PM by Sunny Talwar

# '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?

• ###### Re: 'today' condition in set analysis

Try this:

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

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

• ###### Re: 'today' condition in set analysis

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

• ###### Re: 'today' condition in set analysis

Does your date have a timestamp?

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

• ###### Re: 'today' condition in set analysis

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?

• ###### Re: 'today' condition in set analysis

Is solid Date. 'DD.MM.YYYY'

• ###### Re: 'today' condition in set analysis

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.

• ###### Re: 'today' condition in set analysis

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

• ###### Re: 'today' condition in set analysis

Oops, I missed a parenthesis at the end:

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

• ###### Re: 'today' condition in set analysis

Perfect! It's works! Thank you very much

• ###### Re: 'today' condition in set analysis

Can you share your QVW file with few records?