20 Replies Latest reply: Sep 18, 2018 10:56 AM by Ade Shokunbi RSS

    Using IF with a variable in expression

    Ade Shokunbi

      I am trying to use an if statement with a variable in my expression and I get no results. The variable works when I use the variable on it's own but when used with the if I get no results.

      I have tried:

      if(OrderQtr='Apr-Jun 2018',$(vAvgOrderCost),0)

      if(OrderQtr='Apr-Jun 2018',sum($(vAvgOrderCost)),0)

      sum($(vAvgOrderCost)if(OrderQtr='Apr-Jun 2018',0))

       

      Nothing seems to work. Thanks