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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
walimmalik
Contributor
Contributor

Set Expression with > sign not working

Hi,

I am trying to calculate total count of late started activities, by using a set expression with 2 conditions, the first checks if the activity is not started, and the second checks to see if the current date > planned start date.  Here is the expression im using.  What am I doing wrong?

count({$<ACTIVITY_STATUS = {'Not Started'}, [ACTIVITY_PLANNED_START.autoCalendar.Date] = {"< Date(Now())"}>} ACTIVITY_ID)

I know this works if i put the equivalent into an if statement for a table dimension.

Thanks.

1 Solution

Accepted Solutions
vamsee
Specialist
Specialist

Try

count({$<ACTIVITY_STATUS = {'Not Started'}, [ACTIVITY_PLANNED_START.autoCalendar.Date] = Date ={"<=$(= Date#(Date(Today()), 'MM/DD/YYYY')) )"}

>} ACTIVITY_ID)

Make sure [ACTIVITY_PLANNED_START.autoCalendar.Date] is in the format of mm/dd/yyyy

Also I would like to suggest, use date num.

View solution in original post

4 Replies
m_woolf
Master II
Master II

try:

count({$<ACTIVITY_STATUS = {'Not Started'}, [ACTIVITY_PLANNED_START.autoCalendar.Date] = {"< $(=Date(Now()))"}>} ACTIVITY_ID)


Your Dates must be in the same format.

vamsee
Specialist
Specialist

Try

count({$<ACTIVITY_STATUS = {'Not Started'}, [ACTIVITY_PLANNED_START.autoCalendar.Date] = Date ={"<=$(= Date#(Date(Today()), 'MM/DD/YYYY')) )"}

>} ACTIVITY_ID)

Make sure [ACTIVITY_PLANNED_START.autoCalendar.Date] is in the format of mm/dd/yyyy

Also I would like to suggest, use date num.

walimmalik
Contributor
Contributor
Author

Thank you it worked as well.

walimmalik
Contributor
Contributor
Author

Thank you, it worked!