5 Replies Latest reply: Apr 13, 2018 12:02 PM by Naveen Bandari RSS

    Last 12 month and Previous 12  month

    K Kv

      Hi,

       

      I want to compare the Sum of sales for the last 12 month and for the previous 12 month on the scatter plot

       

      For example, I compare these 2 dates : 12/03/2017 - 12/04/2018 and 12/03/2016 - 12/04/2017

       

       

      I use this formula to calculate last 12 Month

      Sum({<date={">=$(=timestamp(MonthStart(Today(),-12)))<=$(=timestamp(Today()))"}>}FactSoldAmount)


      To compare Last 12 month to the Previous 12  month I wrote this, but it doesn't seem correct. Can someone help me ?



      Sum({<date={">=$(=timestamp(MonthStart(Today(),-12)))<=$(=timestamp(Today()))"}>}FactSoldAmount)

      -

      Sum({<date={">=$(=timestamp(MonthStart(Today(),-24)))<=$(=timestamp(Today(),-12))"}>}FactSoldAmount)