Forum Discussion
Anonymous
1 year agoNot applicable
3 Year Average per Month
Hi All, I am trying to work out an average of X Value over the previous 3 years, not including the current year, by month and then filter by site. In my actual data I have 30+ sites. My tabl...
- 1 year ago
Hi Anonymous
Try with this measure
AverageWindspeedLast3Years = CALCULATE( AVERAGEX( VALUES('Table'[Date]), 'Table'[Average Windspeed]), FILTER( 'Table', 'Table'[Year] < YEAR(TODAY()) && 'Table'[Year] >= YEAR(TODAY()) - 3), ALLEXCEPT('Table', 'Table'[Site], 'Table'[Month], 'Table'[Month No]) )Let me know if it works
suparnababu8
Super User
1 year agoHi Anonymous
Try with this measure
AverageWindspeedLast3Years =
CALCULATE(
AVERAGEX(
VALUES('Table'[Date]),
'Table'[Average Windspeed]),
FILTER(
'Table',
'Table'[Year] < YEAR(TODAY()) &&
'Table'[Year] >= YEAR(TODAY()) - 3),
ALLEXCEPT('Table', 'Table'[Site], 'Table'[Month], 'Table'[Month No])
)
Let me know if it works
- Anonymous1 year agoNot applicable
Hi suparnababu8,
This worked perfectly! Thank you 🙂