Forum Discussion
Anonymous
5 years agoNot applicable
Previous Period Average Based On Date Range Selection
Hi Everyone, I'm a bit stuck on something. I'm trying to find previous period average sales. This on its own i've been able to do, however, where i'm getting stuck is i need to find average sale...
Anonymous
5 years agoNot applicable
Hi amitchandak - I keep getting the same average as the time period selected, rather than the average for the previous period. This is what i'm using:
var average = SUMMARIZE('FactSales', 'Date'[Date], "AverageAmount", SUM('FactSales'[SalesValue])), [AverageAmount])
return
CALCULATE(_average, DATEADD('Date'[Date], -7, DAY))
CALCULATE(_average, DATEADD('Date'[Date], -7, DAY))
amitchandak
Super User
5 years agoAnonymous , try like
CALCULATE(SUM('FactSales'[SalesValue]), DATEADD('Date'[Date], -7, DAY))