2 Replies Latest reply on Jun 18, 2013 8:05 AM by Tracy Rodgers

    Give me the number of days using COUNTD([DATE]) and only filter by year.

    Jerry Ward

      I have a working formula where it gives me the number of days selected in the filter.  So if I have 5 days selected in the filter it will give me 5.

       

      COUNTD([DATE])

       

      The problem I am having trying to run this formula in a IF statement because I would like a COUNTD(DATE) for each year in a dataset.

       

      For example I am trying to give me the number of days in 2013 by set on the filter using:

       

      IF YEAR([StatDate]) = 2013 THEN COUNTD([DATE])  ELSE 0 END

       

      and the same for 2012

       

      IF YEAR([StatDate]) = 2012 THEN COUNTD([DATE])  ELSE 0 END

       

      Ultimately I can have it work correctly if I put a YEAR filter in filter box but my YoY calculations do not calculate correctly.

       

      Thanks,

       

      Jerry