4 Replies Latest reply: Apr 13, 2015 3:10 AM by jagan mohan rao appala RSS

    Current year same date and last year same date comparison

    Mohanraj Subramanian

      Dear All,

      I have a requirement like to compare current year date and last year same date sales.

      And i have a data like this below.

      DateSales
      1/1/20131000
      1/2/20132000
      1/3/2013450
      1/1/2014985
      1/2/2014546
      1/3/2014478
      1/1/2015598
      1/2/2015476
      1/3/20151456

      But the output i needed was like in this format.

       

      DateCurrentyearPrevious year
      1/1/201310000
      1/2/201320000
      1/3/20134500
      1/1/20149851000
      1/2/20145462000
      1/3/2014478450
      1/1/2015598985
      1/2/2015476546
      1/3/20151456478

       

      Current year was the actual sales in that date.And the previous year was same date last year's data .

      Example:

      If  the date is 1/3/2015,then it should populate 1/3/2014 data in the Previous year column.

      Can any one help me on this above requirement.Thanks in Advance

       

      Regards,

      Mohanraj Subramanian