2 Replies Latest reply: Oct 21, 2009 9:05 PM by Carla Hertenstein RSS

    Expression to ignore a selection

      I am trying to come up with an expression that would count the instance when certain dates apply. however, I want to ignore any selection made in the Status field but still want to include any selections made on other fields. I was able to create an expression that would ignore all selections, but I cannot figure out how to modify this to keep my date piece, and ignore 1 selection but not others (for example I have a Type and a Location that I would still want to be selected and see that reflected in my count).

      COUNT(DISTINCT {1-$} if(EndDate > Today(0)-6 AND EndDate > '1-1-3000'), RecordNumber)

      Any suggestions on how I could modify this one? Thanks!

        • Expression to ignore a selection
          Neil Miller

          You seem to be combining Set Analysis and If Thens. You should be able to do it all with Set Analysis.

          How about this:

          COUNT(DISTINCT {1<EndDate = {$('>Today(0)-6')},EndDate = {$('> 1-1-3000')}>} RecordNumber)

          That will ignore all selections, but force the End date logic (although I'm a little confused as to why you need two and what 1/1/3000 is).

          EDIT: I changed my mind. If you only want to ignore the selections in the Status field, use:

          COUNT(DISTINCT {$<Status=,EndDate = {$('>Today(0)-6')},EndDate = {$('> 1-1-3000')}>} RecordNumber)