1 Reply Latest reply on Apr 10, 2017 10:17 PM by Galen Busch

    Finding last 2 months average by category

    raghavendra N

      Hi ,


      I am trying to calculate the average for last 2months for sales by category but not getting the desired output. I


      I have tried to create a set based on the created date:


      Last 2 months = DATEDIFF('month',[ORDER_DATE],today()) <= 2


      and create a calcuated field as  Avg last 2 months: SUM(IIF([Last 2 months],[Number of Records], NULL))/COUNTD(INT(IIF([Last 2 months], [Create date], NULL)))


      any help on this is really apreciated.