2 Replies Latest reply on Oct 24, 2017 5:05 PM by Zhouyi Zhang

    Parameters in aggregated Calculations

    Vijaymakesh Rajgopal

      I am trying to include a parameter in a caculation that contains an if condition

       

      My data looks like this

              

      LocationAssociateSalary
      AJohn76865.2829
      BJim87061.60662
      CJill46917.90774
      AJack46132.38815
      CJeff44400.90168
      BJoe69853.01512

       

      I have 2 parameter, lets say "A_input" and "B_input". Calculation i am looking for is:

       

      if Location = "A" then

      Avg(Salary) * [A_input]

      elseif Location = "B" then

      Avg(Salary) * [B_input]

      else Avg(Salary)

       

      I am not getting this to work. I keep getting mixing aggregated and non aggregated values. How can i solve this?