4 Replies Latest reply: Jun 9, 2016 6:17 AM by Stijn Goes RSS

    Dividing 2 Expressions in a chart: A Different result for the 'same' calculation.

    Stijn Goes

      I have an annoying and rather difficult to explain problem.
      My data model uses a calendar table (to generate a complete calandar) and it's linked to a data table on one field.

      It doesn't link to any other tables in the model.

       

      My 'chart' uses the calendartable as a dimension (by month, week , year), and the values from the data table to calculate the expressions.

       

      Expression "Amount_Open"

      =Sum(DataTable_Amount_Due)

      Expression "Amounth_Payed)"
      =Sum(DataTable_Amount_Payed)

       

      So if I want the % payed

      =(Sum(DataTable_Amount_Payed))

      /

      (Sum(DataTable_Amount_Due))

       

       

      However

      If I calculate essentially the same column using
      [Amount_Open] / [Amount_Payed]


      I get a difference of several %.

       

      The actual code is a bit more complex  as there is a some basic set analysis in the sums to filter out certain data rows. And the actual Amounth Due And payed is calculated from several fields as well.
      However It's the same in both expressions. I don't believe it's a rounding error as even rounding to 0.00000001 doesn't impact the result I get from the combined expression.

       

      Any suggestions on where to look for the problem?