15 Replies Latest reply: Feb 16, 2016 9:52 AM by Kaushik Solanki RSS

    Last three months count in Month wise table

    Chanchal Sharma

      Hi All ,


      I have a requirement I have to show Month wise customer count in table where in one expression need to display count of customer code and in next expression need to display customer count of  last 3 month in respect of that month .

      For example if first row for Jan 2015 ,last 3 month count of customer would be Nov ,Dec and Jan .

      in next row Feb 2015 ,last three month would be Dec ,Jan and Feb .


      I used rangesum function but it is giving me sum of last 3 row which is incorrect  .

          RangeSum(above(Count(distinct{<_Flag={'SD WOD_DOD'}>}CustomerCode),0,3))


      then I pass condition for last 3 month in set analysis but it is giving same value as month wise value .

        Count(distinct{< _Flag={'SD WOD_DOD'},CommonDate ={">=$(=num(MonthStart(Date(Max(CommonDate)-90))))<=$(=num(MonthStart(Date(Max(CommonDate)))))"}>}CustomerCode)


      Please check both expresion which I used ,help me out .

      If any another solution can be provided, would very helpful .


      Thanks in Advance