5 Replies Latest reply on Oct 31, 2018 6:13 AM by kerine.taylor

    Cannot mix aggregate and non-aggregate error

    kerine.taylor

      Hi Everyone

       

      I have created the below calculated field that displays Sales if 1 region is selected otherwise it uses Sales (GBP). It works however if i try to use it in other calculations to get the Sales YTD or at a specific date for example i get the error: Cannot mix aggregate and non-aggregate. In the attached workbook I've added a calculated field called Current Sales (local/GBP) in the sample workbook attached as an example of the error.

       

      IF COUNTD([Region]) = 1 THEN SUM([Sales])

      ELSE SUM([Sales (GBP)])

      END