I need to create a measure that returns the average of the latest N weeks for each day of week. For example if the user sets N=25, so the table must show the sales forecast by calculating the average of the latest 25 Mondays, Tuesdays, ...
The output is something similar as the following table:
The Forecast measure needs to identify the day of week of the date (The Week Of day helps with that) in the row and sum the latest N days of week (from previous weeks) and divided by N.
I am having issues trying to sum the previous N weeks because the set analysis only evaluates once instead of evaluates by row.