4 Replies Latest reply: Mar 30, 2012 2:03 AM by Meelis Karulin RSS

    Selection and variable, same source, different results?

      Hello again.


      Theres two listboxes containing campain name and sales, but one multiplies it by two for some reason.


      Same campain, two different results. First sum is calculated like this:

      =Sum(if(TransDate >=cBeginDate AND TransDate <=cEndDate ,Quantity))


      and the second like this:

      =Sum(if(TransDate >=$(vcBeginDate) AND TransDate <=$(vcEndDate) ,Quantity))


      Variables vcBeginDate and vcEndDate are set from click action like this:






      The first listbox name is calculated from selection and the second from variable, so they are both the same...

      Then why is the result from the first listbox 2 times greater?

      I can use /2 on the first one and get a correct answer but its impractical and i want to understand why it's doing that


      Thanks n advance