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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Evan0211
Creator II
Creator II

Error when using dates in a KPI expression

I have a KPI that checks against various conditions, one of which is if a date falls before a variable date.  The expressions is written as:

<[ULTIMATE_COMPLETION_DATE]={"<=$(=Date(today()+$(vDays_Remaining_Variable_Input)))"}>

This expresses to:

<[ULTIMATE_COMPLETION_DATE]={"<=3/2/2042"}>

(the default is set to 7300 days for testing purposes).

However, the KPI resolves to zero.  If I remove the line above (<[ULTIMATE_COMPLETION_DATE]={"<=$(=Date(today()+$(vDays_Remaining_Variable_Input)))"}>) the KP resolves to 30, which is correct, so there is an issue in that line.

My guess is that [ULTIMATE_COMPLETION_DATE] needs to be converted to a Date, but that isn't working.  Any advice?

Labels (2)
1 Solution

Accepted Solutions
Evan0211
Creator II
Creator II
Author

I found the issue.  I was using Date() instead of TimeStamp().  

View solution in original post

1 Reply
Evan0211
Creator II
Creator II
Author

I found the issue.  I was using Date() instead of TimeStamp().