6 Replies Latest reply on Oct 16, 2019 10:16 AM by Neha Vaishnavi

    HELP in choosing right function for mixing aggregate and non-aggregate functions error

    Neha Vaishnavi

      Hi,
      I am trying to fix the following error which is highlighted in red.
      I tried using ATTR FLOAT but I get error when I use min or max then I dont get error. Problem is, this is a date and I want to know which is the right function to use for date and gives me result.
      IF min(MONTH([Date]))<= min(MONTH({fixed: max([Month Year])}))

      AND min(YEAR([Date]))  = YEAR(TODAY())-1

      THEN sum([A])

      + sum([B])

      END

       

      Please experts out there help me out. Also I tried using sum in the beginning of all functions but then I don't get two values summing up. only one value is returning instead of summing up two values which is (Revenue based on parameter):

      Example:

      SUM(IF (MONTH([Date]))<= (MONTH({fixed: max([Month Year])}))

      AND (YEAR([Date]))  = YEAR(TODAY())-1

      THEN ([A])

      + ([B])

      END)


      And I get the value of Revenue based on parameter only instead of (A+B).

       

      Message was edited by: Neha Vaishnavi