Forum Discussion
Anonymous
4 years agoNot applicable
Rolling average
Hi Can anyone see whats wrong with this formula? id like to get a 30 day rolling average, but i saw this online and tried to use it, just to get any kind of rolling average for now. but the res...
- 4 years ago
If Turnover is a column rather than a measure, I think you should put the CALCULATE inside the AVERAGEX iterator in order to do the context transition.
Turnover 30D Avg. = AVERAGEX ( FILTER ( ALLSELECTED ( 'Calendar' ), 'Calendar'[Date] <= MAX ( 'Calendar'[Date] ) ), CALCULATE ( onetouch_daily_account_summary_last_2_months[Turnover (€)] ) )
AlexisOlson
4 years agoSuper User
If Turnover is a column rather than a measure, I think you should put the CALCULATE inside the AVERAGEX iterator in order to do the context transition.
Turnover 30D Avg. =
AVERAGEX (
FILTER (
ALLSELECTED ( 'Calendar' ),
'Calendar'[Date] <= MAX ( 'Calendar'[Date] )
),
CALCULATE ( onetouch_daily_account_summary_last_2_months[Turnover (€)] )
)