1 Reply Latest reply on Oct 5, 2016 11:24 AM by Michael Hesser

    Comparing dates

    Abhinav Kumar

      Hi All,

       

      I think many people would have asked about this problem, unfortunately, I am unable to find the solution.

      I have hard coded date values for 2 months dated 07/30/2016 by the name July_date and 08/01/2016 by the name August_date. I have one column by the name of datePurchased.

       

      I have written a calculated field but is giving an error:

      IF ([datePurchased]) <= [July_date] THEN Count([OrderNumber])

      ELSEIF ([datePurchased]) >= [August_date] THEN Count([OrderNumber 2])

      END

       

      The error is "Cannot mix aggregate, non-aggregate comparisons or results in IF expressions"

       

      Can someone please help me out with this. The data set is in MS Excel.

       

      Thanks

      A