Using the Minstring() function to calculate the age of the oldest case in a queue
Support centers for any organization log several customer cases during the day. These cases are sometimes tagged with a specific status such as contact, and review. Each case goes through different statuses in the workflow until it reaches closed or sign off in the queue. The following example calculates the number of cases in each status of the workflow, and then makes use of the Minstring()
function to calculate the number of days passed since the oldest case logged for a particular status.
Getting ready
Load the following script, which gives information on the cases logged at a debt collection agency:
LET vToday=num(today()); Case: LOAD CaseID ,DATE(Date#( DateLogged,'DD/MM/YYYY')) as DateLogged, Status INLINE [ CaseID,DateLogged,Status 101,01/01/2002,Advice 101,25/04/2002,Contact 101,21/06/2003,Creditors Meeting 101,24/06/2003,Draft Allocation 101,30/06/2003,Sign off 102,18/10/2009,Contact 102...