1 Reply Latest reply on Oct 9, 2018 11:47 AM by Deepak Rai

    Comparing Data Across Years on Similar "Days Out" Scale

    Adam Ciampaglio

      I am needing to compare data across multiple years and I have used Datediff for this in the past but it does not appear to be working for me now for some reason. I have a field for year, and the other fields I am using are an action date with each row of my data being an individual with a unique ID, with the potential for the unique ID to show up in multiple years. The annual date I am trying to compare to shifts annually so I have manually entered it for each year.

       

      Here is what I am trying to use:

      INT(IF ([Year]=#2014-01-01#) THEN DATEDIFF('year',#2014-02-04#,[Action Date Field])

      ELSEIF ([Year]=#2016-01-01#) THEN DATEDIFF('year',#2016-02-07#,[Action Date Field])

      ELSEIF ([Year]=#2018-01-01#) THEN DATEDIFF('year',#2018-02-06#,[Action Date Field])

      END)