Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

morenoju
Contributor III

Today() in Set Analysis

Hello all,

This should be an easy one, but no matter how I write the Today() condition in this set analysis expression, I end up having a blank chart: I want to show the average verification time for events with a certain status (31) and that started today.

I've tried several alternatives, with no luck:

Avg({<start_date={"Today()"},event_status_id={'31'}>}verification_time)

Avg({<start_date={$(=Date(Today(), 'MM/DD/YYYY'))},event_status_id={'31'}>}verification_time)

If I write the date, it does work:

Avg({<start_date={"11/22/2017"},event_status_id={'31'}>}verification_time)

Any idea on what might be wrong with Today()? This seems like a syntaxis issue, but I can't see what the mistake is.

Thanks,

Juan

1 Solution

Accepted Solutions

Re: Today() in Set Analysis

Try this

Avg({<start_date={"$(=Date(Today(), 'MM/DD/YYYY'))"}, event_status_id={'31'}>} verification_time)

4 Replies

Re: Today() in Set Analysis

Try this

Avg({<start_date={"$(=Date(Today(), 'MM/DD/YYYY'))"}, event_status_id={'31'}>} verification_time)

morenoju
Contributor III

Re: Today() in Set Analysis

Works! Thank you, Sunny.

One thing I'm noticing though. Today() is returning yesterday. I've used KPIs and they show the following:

Today()=11/21/2017 (yesterday)

Today(0)=11/22/2017 (today)

Now()= 11/22/2017 1:51:13 PM


I've checked the date in the PC is right and I've just done a data load. Any reason for Today() to return 11/21?

Re: Today() in Set Analysis

I am not sure why it might be doing this....

morenoju
Contributor III

Re: Today() in Set Analysis

I'll open a new question for that. In any case, you answered the original question right. Thanks for your help!

Community Browser