
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Set Analysis with Variables
Good afternoon,
I was hoping for some help on variables in Set Analysis. I have created a new new variable to calculate the days between today() and the review date of a document:
vEventDuetoToday; num(DocumentDueDate)-num(today())
I also created a variable for v30Days which is num(30).
This works all fine, however I need to count the number of documents that are due to expire within 10 to 30 days, and then documents that are past their due date. The below Set Analysis works for counting all documents I have, but I need to modify it to count those as per the above. I've looked around but am a bit stuck. Any help would be great:
count({$<DocumentCaseType={'Care Needs Assessment 1'},DocumentOverallStatus={'InProgress'},
DocumentDocumentTemplateName={'CNA*'} >}DocumentCaseNumber)
I tried adding in $(v30Days) = {">=$(vEventDuetoToday)"} but that just broke it.
Any help would be great 🙂
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @jamesmf1982, you can use following sintax in your set analysis:
count({$<DocumentDueDate={"<=$(=Today() + 30)"}, DocumentCaseType={'Care Needs Assessment 1'},DocumentOverallStatus={'InProgress'},
DocumentDocumentTemplateName={'CNA*'} >} DocumentCaseNumber)
Maybe you need to use also a Date() function to format properly the due date, like $(=Date(Today() + 30, 'MM/DD/YYYY'))depending on your default date format.
JG

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @jamesmf1982, you can use following sintax in your set analysis:
count({$<DocumentDueDate={"<=$(=Today() + 30)"}, DocumentCaseType={'Care Needs Assessment 1'},DocumentOverallStatus={'InProgress'},
DocumentDocumentTemplateName={'CNA*'} >} DocumentCaseNumber)
Maybe you need to use also a Date() function to format properly the due date, like $(=Date(Today() + 30, 'MM/DD/YYYY'))depending on your default date format.
JG

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for that, worked perfectly with the date addition
