9 Replies Latest reply on Apr 9, 2018 6:39 AM by daniel.andell

    Running 12 months from last invoice


      I would like to have a running total as a line chart showing last 12 months of sale and compare to the last 12 months before that. I have created the calculation below and it works fine except that it is calculating from today. Lets say my last sales date is 15th of October then I would like the calculation to be from that date.

      Another thing I would like to do is to make the calculation count 12 months back from that date not from month. So, I would like help to remake the calculation to take one year back. For example if it is the 15th of November I would like the calculation to look until the 16th of November last year.

      Last thing I would like to do is to reverse the month depending on what month it is. For example, if last invoice date is February then I would like February to be shown first and the other months behind it. So that you see 12 months behind last invoice.



      IF (DATEDIFF('month',[Day],TODAY()))<=12 THEN [Sales amount] ELSE null END