Forum Discussion
Changing Filter Context in Measure
- Anonymous2 years ago
Hi phjz ,
Please have a try.
YTD Actuals Average = VAR CurrentYear = MAX(Calendar[Year]) VAR LastDate = MAX(Calendar[Date]) RETURN AVERAGEX( FILTER( SUMMARIZE('Calendar', Calendar[Year], Calendar[Date], "WeekActuals", [Actuals]), Calendar[Year] = CurrentYear && Calendar[Date] <= LastDate ), [WeekActuals] )How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ RongtieIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- 2 years ago
this works perfectly - thank you so much!
Hi phjz ,
Please have a try.
YTD Actuals Average =
VAR CurrentYear = MAX(Calendar[Year])
VAR LastDate = MAX(Calendar[Date])
RETURN
AVERAGEX(
FILTER(
SUMMARIZE('Calendar', Calendar[Year], Calendar[Date], "WeekActuals", [Actuals]),
Calendar[Year] = CurrentYear && Calendar[Date] <= LastDate
),
[WeekActuals]
)
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
this works perfectly - thank you so much!