3 Replies Latest reply: Mar 15, 2017 2:18 PM by Sunny Talwar RSS

    Only Last Values (by time) on a used-based selection

    Matteo Demartini

      Hi guys,

       

      I have a data set with a structure like:

       

      LOAD * INLINE [

          Date, Project, Costs

          201601, A, 2

          201601, B, 3

          201602, A, 5

          201603, B, 9

      ];

       

      I am requested to sum the cost considering only the last cost value by time for each project, considering the selection made by the user.

      For instance, if the user selects 201601 + 201602, the proper sum result would be 8 (5 for A, 3 for B, not considering the cost value for A on jan).

       

      Any idea on how to handle this stuff?

       

      Thank you on advance.

       

      Best,

       

      Matteo