4 Replies Latest reply: Jun 15, 2016 1:51 PM by Aravind Sasidharan RSS

    Change over Previous Month

    Aravind Sasidharan



      I am trying to plot a monthly variance chart i.e current month variance over previous month.


      Followed the approach described here




      So the prior month count would be:


        Count({$<MonthID = {$(=Max(MonthID)-1)}, Year =,Month = >} distinct id)


      So a tabular representation should look similar to the table below


      Month        |  Count | Previous Month Count | Variance

      Jan 2016          10                  0                            0

      Feb 2016          15                10                          50%

      March 2016      10                15                        -33%


      But I am getting zeros in all for all previous count except for the second last month Feb 2016 in this case . I am guessing it because of Max(MonthID) -1 evaluates to Feb 2016.


      Is there a way get the prior month count for all months? So that I can plot a graph similar to the one below; It could be a count difference