Hi,
i'd like to calculate the average of a cumulative figures by a given time interval, so example 7 days, so the total for a rolling 7 day period would be divided by 7, not the number of figures in that interval;
So if between 11th and the 17th there were 2 returns that that would be the total divided by 7 not 2.
Just dividing by 7 is fine once you have more than seven dates, in excel I'd use ROW() inside an if statement as the divosor;
=IF( ROW(1:1)<7,
SUMIFS([Sales],[Date],"<="&[@Date],[Date],">"&[@Date]-7)/ROW(1:1)
,SUMIFS([Sales],[Date],"<="&[@Date],[Date],">"&[@Date]-7)/7)
I've been trying to come up with something similar in DAX, but can't find a function similar to ROW() ,
is there a way around this I was going to try datesbetween but if anyone has any suggestions ( helpfull 😀 )
workbook attached.
Richard
Bookmarks