6 Replies Latest reply on Mar 26, 2018 5:45 AM by David Maning

    cannot mix aggregate and non-aggregate arguments with this function

    Sebastian Vogel

      Hi guys,


      I have a little challenge to get the formula below working: Basically I would like to check whether conditions of material status [MS] are met and if so Tableau should return calculations shown below.


      However this does not work as I obviously mix aggregated and non-aggregated arguments (see subject header)


      I am wondering how I can overcome this issue. The check of material status [MS] is mandatory before returning values as otherwise the outcome will be not correct.


      Is there any simple solution to solve those issues?


      Thank you in advance






      IF [MS]<>"BI" and [MS] <> "BO"

      then [Correct Stock AS]/([Total GI QTY]/-5)

      ELSEIF [MS] = "BO"

      then ([Correct Stock AS]/([Total GI QTY -3 years]*-1))