2 Replies Latest reply: Apr 17, 2013 5:21 PM by Francesco Menin RSS

    Product of sequences in QlikView 11


      I have the need in a QlikView file of create a formula that multiplies all the values in a field.


      That would be easily described as the product of sequences, yet in QlikView it seems to me that is not present a "product()" function.


      I came across the solution already proposed in 2009 in another thread:


      exp( sum( log( field ) ) )
      I tried to apply this to my case but if use it in a Chart it looks like it isn't giving the correct order to the operands.
      For example if I have a table:
      and I want to get:
      A = 1.3 * 1.25 = 1.625
      B = 1.5 * 1.7 = 2.55
      the result is always 1 with the exp(sum(log())) expression.
      The same result is given if I pass the value as a different field with log(Value) in the script.
      If I write the "equivalent" expression: exp( log(1.3) + log(1.25 ) ) the result is 1.625
      Has anybody got a hint on this?
      Thank you