1 Reply Latest reply on Mar 9, 2016 1:56 AM by Sankarmagesh Rajan

    This month last year calculation

    keerthana kumar

      Hi ,

       

      I need to create a report like below

      tm_ly.png

      I have calculated TM_sales Amount as below where [Choose Month] is parameterin the format mmmm,yyyy and [FY DATE] is my date column

      TM_sales Amount----if DATEDIFF('month',[Choose Month],[FY DATE])=0 and year([FY DATE])=year([Choose Month]) then [Sales Amount] END

       

      Issue is with calculating same month last year ie, january 2015.I tried the below formulas but im not getting any value

       

      LY_TM_sales---if DATEDIFF('month',[Choose Month],[FY DATE])=0 and year([FY DATE])=year([Choose Month])-1 then [Sales Amount] END

                                if DATEDIFF('month',[Choose Month],[FY DATE])=12 then [Sales Amount] END

        • 1. Re: This month last year calculation
          Sankarmagesh Rajan

          hi Keerthana,

           

          Try this for current month sales and previous year current month sales.

          current month sales

          if datediff('month',[Date],[date1])=0  then [Budget Sales] else 0 end

          Last year current month sales

          if  datediff('year',[Date],[date1])=1 and datediff('month',[Date],[date1])=12  then [Budget Sales] else 0 end

           

          thanks

          sankar

          1 of 1 people found this helpful