4 Replies Latest reply: Aug 13, 2014 2:47 AM by Stevens Bonnand RSS

    Sum values in function of dates

    Stevens Bonnand

      Hi everyone,

       

      I need some helps to resolve this problem :

       

      I got 2 tables :

       

      Table A :

      Key          Date1          Value1

      1               2010          5

      2               2010          8

      3               2011          7

      4               2012          6

      5               2013          2

       

      Table 2 :

      Key          Date2          Value2

      1               2013          12

      2               2011          10

      3               2010          1

      4               2010          7

      5               2011          6

       

      Resulat needed :

      Date          Value1          Value2

      2010          5+8               1+7

      2011          7                   10+6

      2012          6                   0

      2013          2                   12

       

      I need to sum value1 and value2 in function of year (from field Date1 and Date2). For this, I need to "ignore" the Key. Can I do it into an expression ? I can't modify my datamodel. I need to keep the key and I can't use date fields as key.

       

      Thanks for helping

       

      EDIT : Easy thank IF but very slow. I'm looking for SET ANALYSIS