22 Replies Latest reply: Sep 28, 2016 5:25 PM by Jason Campbell RSS

    Count if criteria met and within date range

    Jason Campbell

      I'm trying to count the number of times (Distinct) AgtID is listed if the agPhoneNum=callPhoneNum AND the DateQuoted is between sDate & sDate7.  (sDate7 is simply sDate + 7 days, defined in the script)  I'm not using any variables here.


      Here is what I have, which works ONLY when a date is selected.

      Count({<agPhoneNum = {'callPhoneNum'}>+<DateQuoted={">=$(=sDate)<=$(sDate7)"}>} AgtID)


      I need something that will work even if a date is not selected.  It currently just zero's out.  The first column is Date in my chart (straight table), so date is a dimension.


      What am I missing???  Why does a date have to be selected for the expression to work?