Forum Discussion
Weekly Totals per player
Hello ThomasRichard21,
Can you please try the following approach:
1. Calculate the weekly total distance for each player
WeeklyTotalDistance =
CALCULATE(
SUM(ARaw[Total Distance]),
FILTER(
ARaw,
ARaw[Nom] = MAX(ARaw[Nom]) && ARaw[Semaine] = MAX(ARaw[Semaine]) &&
(ARaw[Period Name] = "Terrain" || ARaw[Period Name] = "Match" || ARaw[Period Name] = "Reha" || ARaw[Period Name] = "Modifié" || ARaw[Period Name] = "Récup")
)
)
2. Calculate the average weekly total distance per player
WeeklyAverageDistance =
CALCULATE(
AVERAGEX(
VALUES(ARaw[Semaine]),
[WeeklyTotalDistance]
)
)
3. Calculate the average of all players' weekly totals for a given week
OverallWeeklyAverage =
CALCULATE(
AVERAGEX(
SUMMARIZE(
ARaw,
ARaw[Nom],
ARaw[Semaine],
"WeeklyTotalDistance", [WeeklyTotalDistance]
),
[WeeklyTotalDistance]
),
ALLSELECTED(ARaw[Semaine])
)
You should also have a relationship between your player names and week numbers in both tables.
Hope this helps!
Hi Sahir_Maharaj ,
Thanks a lot for the fast answer.
Should they all be "New Measures"?
Regarding your 2nd Measure "WeeklyAverageDistance", I am not sure I understand what I would measure with that, but I did it and it seems to give me the same thing than the first one. also where do you use it in your 3rd suggested measure?
Regarding the last one OverallWeeklyAverage, it doesn't seem to give me the right result.
Also I don't understand from which tables I should match the players and week numbers? Should I create a new table at some point?
Thanks a lot again
Thomas