6 Replies Latest reply: Feb 29, 2012 4:56 AM by Quentin Raith RSS

    To find the sum of a field for last day of month

      Hi,

       

      I need to find the sum of a field for last day of month

      I have the data in  foll format

       

       

      Date                                Pdt            SalesCount

      2012-01-01   A                         100

      2012-01-01   B                         100

      2012-01-02   A       100

      2012-01-02   B                         200

      ..

      ..

      2012-01-31   A      300

      2012-01-31   B      400

      2012-02-01   A      200

      2012-02-01   B      300

      2012-02-02   A      400

      2012-02-02   B      500

       

       

      For each month, i need the sum of the SalesCount for last day of the month. In the above example, for Jan, i need the sum of sales count for 31st Jan and for Feb, i need the sum of salescount for 2nd Feb

       

       

      I have Month as a dimension

       

       

      Expected output:

      2012 Jan  = 700  

      2012 Feb  = 900

       

      Please suggest..