5 Replies Latest reply: May 18, 2010 6:25 PM by sergfrac RSS

    Sum with InYearToDate

      Dear guys,

      I'm not able to solve an issue related a sum with InYearToDate

      Firstly, the data I use are included in the year I'm analyzing so the 2 expressions below should give me the same result :

      1) sum(var)

      2) sum(if(InYearToDate (InvoiceDate.......... ),var)

      but looking to attached file u will see for both expression different result.

      In case of 2) it duplicate the values. Using DISTINCT solve the example I've but create problem in other case where the dimension I've to use give back just one row.

      I've created just a fast example, that I attach, of the issue I have in my production environment


      Thanks for your helps