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.
What average are you looking for? A row level average? How are you using the result? You just want to know what it is? Visualize it in a certain way? Compare it to something?