5 Replies Latest reply: Jan 6, 2016 7:45 AM by Chanty 4u RSS

    Count with date difference as condition

    Trinh Le

      Hello!

       

      Here is my sample data:

      Capture.PNG

      I want to count the records that fits the condition: Date B - Date A <= 180

       

      I tried a number of expressions but none work:

      • count(distinct if((date([Date B])-date([Date A])) <= $(180),[ID]) >>  nothing is displayed?
      • count(distinct {$<[Date B] = { <=$(=<date([Date A]+180)) } >} [ID]) >>  counts all records (result = 20)
      • count(distinct {$<[Date B] = {" <=$(=<date([Date A]+180)) "} >} [02_Full_name]) >>  result = 0

       

      Please help!