5 Replies Latest reply: Apr 24, 2013 4:55 AM by Janne Vauhkonen RSS

    How to use if-statement in Qlikview?



      I am using in excel very often formula if(iserror(.... How could I use that in Qlikview?


      I have a problem that sometimes I don't get any result with my formula because some part is missing and in these cases I would like to use another formula. How can I write that script?


      I have following script


      =if(Sum(demand*price)=0,Sum(demand*([Beginning Inventory]/[Beginning Inventory kg])),Sum(demand*price))


      0 is wrong in this formula.


      If price doesn't exist I will not get any result.


      In excel I would write this as following


      If(iserror(demand*price),([Beginning Inventory]/[Beginning Inventory kg])*demand,(demand*price))


      How can I do same thing in QlikView??