6 Replies Latest reply: Jan 26, 2017 11:11 AM by Ritesh Pathak RSS

    Finding sales on Min date of a month against Month dimension

    Ritesh Pathak

      Hi Guys,

      I have a Sales table as below:

       

      Sales:

       

      DateSales
      11/1/201610500
      11/1/20168000
      11/21/201611000
      11/30/201617000
      11/30/201610200
      12/2/201613200
      12/14/201617000
      12/29/201621000
      1/3/201716000
      1/10/201718000
      1/22/201714000
      1/22/201721000

       

       

      I want an output like the table below

       

      MonthYearTotal SalesSales on Min date of MonthSales on Max date of Month
      Nov-16567001850027200
      Dec-16512001320021000
      Jan-17690001600035000

       

      I am using following expressions

      =Sum({<Date ={'$(=Min(Date))'}>}Sales)

      =Sum({<Date ={'$(=Max(Date))'}>}Sales)

       

      but what I am getting is

       

      MonthYearTotal SalesSales on Min date of MonthSales on Max date of Month
      Nov-1656700185000
      Dec-165120000
      Jan-1769000035000

       

      Could somebody please help?

       

      Thanks in advance.

      Regards,

      Ritesh Pathak