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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
william_allen
Contributor III
Contributor III

Set analysis - field > a date format

Hi All,

I am having an issue with the following expression hopefully someone can help shed a little light on it.

=count({1<[CALL URGENCY]={'Critical'}, [CALL STATE]={'Open'}, [ACTUAL_LOG_DATE]={"<$(vCriticalTime)"}>} [CALL_NUMBER])

The problem is with:  [ACTUAL_LOG_DATE]={"<$(vCriticalTime"}

To explain what's going on a little better:

vCriticalTime = Timestamp(now()-0.1667, 'YYYY-MM-DD hh:mm:ss')

ie vCriticalTime = '2014-07-23 10:46:37 '

The count always comes out as 0 which is wrong.

Can anyone see where I'm going wrong when trying to determine if my vCriticalTime is less than the [ACTUAL_LOG_DATE]?

Thanks for your help

Update fixed the missing ) , still having same issue

21 Replies
Not applicable

Hi William,

Try quotes for the variables once.. '$(vCriticalTime)'

=count({1<[CALL URGENCY]={'Critical'}, [CALL STATE]={'Open'}, [ACTUAL_LOG_DATE]={"<$(='$(vCriticalTime)')"}>} [CALL_NUMBER])

william_allen
Contributor III
Contributor III
Author

Thanks for everyone's time on this question. I've decided to go a different way and add flags to the tables before creating the QVD's which I think may be a better solution in the long term.