3 Replies Latest reply: Nov 17, 2015 5:46 PM by Jordan Konicki RSS

    Count with multiple conditions?

      Hi there,

       

      I'm trying to utilize a count that has multiple conditions attached to it. The conditions are composed like this:

       

      1. The Expiration date <> 0 or null

       

      2. Today's date must be greater than or equal to the Expiration date.

       

      If both of these are fulfilled, then it should count the field named RTC_TITLE.This is what I have so far:

       

      Count({$<CERTIFICATION_EXPIRATION_DATE= {"<>0"}, vToday >= "CERTIFICATION_EXPIRATION_DATE">} RTC_TITLE)

       

      I keep getting an error from this though. What am I doing incorrectly that would throw an error? Any help is appreciated.

       

      Thanks!

        • Re: Count with multiple conditions?
          Nakul Navre

          Hi Jordan,

           

          Could you try this:

           

          count( {$<CERTIFICATION_EXPIRATION_DATE -= {''}, CERTIFICATION_EXPIRATION_DATE -= {0} , CERTIFICATION_EXPIRATION_DATE = {"<=$(=(today()))"}>} RTC_TITLE)

           

           

          Filtering Null value my be tricky sometimes and the above syntax can actually be simplified further by including all  (*) and then excluding the ones you don't need:-

           

          count( {$<CERTIFICATION_EXPIRATION_DATE = {*} - {'',0,"<=$(=(today()))"}>} RTC_TITLE)

           

          Thanks

          Nakul