5 Replies Latest reply: Aug 17, 2017 9:42 AM by Sunny Talwar RSS

    AGGR with Above to get previous month value

    Wayne Antinore

      Hi I'm using an AGGR with above in order to get a previous month's value.  This mostly works but doesn't work when the year rolls over.  For January I always get a blank value instead of the prior December value.  I've looked at a lot of examples and my expression looks like the ones that do this but I can't seem to get this to work.  Thanks in advance for any help.

       

      Here is the expression for prior month

      Aggr(above(count(distinct [Order#])),(Order_Year,(numeric,ascending)),(Order_Month,(numeric,ascending)))

       

      Attached is the table output.  I'd want prior month value for January 2017 to have a value of 124894