2 Replies Latest reply: Aug 18, 2017 1:57 PM by Jason Campbell RSS

    Need Expression Assistance (Please)

    Jason Campbell

      I need to ask for some help with an expression.  I think it’s ‘almost’ where I need it.  Just can’t figure out the last piece.



      First, on any given day, telephone numbers call in.  User selects a day and QV counts the number of times the telephone called.  If it called one time only, it gets a value of 1. If it called >1 times, it gets a value of 0.  The sum of this column divided by the total distinct count of telephone numbers provides a First Call Resolution %. 


      Next, the user can select a trailing date range. In the example below, vdatekey is the user selected date.  vTmaxdate is set using a listbox (T1-T30) (T = ‘Trailing # Days’).  The variable is set using the Date(vdatekey – GetSelectedCount).  The datakey is the call’s workgroup and telephone number.  There are 30 expressions in the chart object, T1-T30. Each one with vdatekey – 1, vdatekey -2, etc…  It tells me what I need to know using the expression below, but it doesn’t give me a sum (Total Mode > Expression).  I need the sum so that I can divide it by the total count of distinct telephone numbers on the date selected by the user.


      Any ideas on how I can get this to total?


      =if(aggr(only({<datekey={"$(=Date(vdatekey))"}>}datakey),datakey) =
      aggr(only({<datekey={">=$(vTmaxdate) <=$(vdatekey)"}>}datakey),datakey),
      aggr(sum({<datekey={">=$(vTmaxdate) <=$(vdatekey)"}>}Ct),datakey)=1,0)*-1

      This expression is in the FCR% column…the one I need to Total.

      20170818 QV.PNG