3 Replies Latest reply: Aug 14, 2017 12:11 PM by Wendy Harrison RSS

    Should I include the else function to achieve my result?

    Wendy Harrison

      Hi Everyone,

       

      Please could someone help me with this expression.

      I have created this as if there is an entry in the column which is 0.00  then it does not get to be included in the overall total.   This works perfectly just so long as the overall discount is not 0.00.

       

      When it is 0.00 my result just shows blank when it should show the Avg(Cost).

       

      I think I probably need to use the else function but I am struggling to know where I should include it.

       

      Expression

      Avg(Cost)

      *

      Avg(if([Discount %]>0,[Discount %]))

      +

      Avg(Cost)

       

      Result Should be

      Discount%CostResult
      9.00%394.86433.91
      9.00%401.90441.65
      0.00%358.99

      358.99

       

      Result Qlik Sense showing

        

      Discount%CostResult
      9.00%394.86433.91
      9.00%401.90441.65
      0.00%358.99-

       

      Many Thanks

      Kind Regards

      Wendy