Forum Discussion
veranceftw
6 years agoHelper II
Measure won't sum up
Hello! I have a measure that calculates the sum of a stat for every player. However, when I group those players as a team, instead of summig up all the measures for each player, it seems to be re...
- 6 years ago
Hi veranceftw ,
Sorry to reply late.
Please try to create a measure like so:
Measure 2 = SUMX(VALUES(all_match_stats[player_name]),[Pressure Final 3rd p90])Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
az38
6 years agoCommunity Champion
maybe you need smth with SUMX()
Pressure Final 3rd p90 =
SUMX(all_match_stats,
SUM(all_match_stats[pressures_att_3rd]) / (SUM(all_match_stats[minutes]) / 90.0)
)
but more correct and appropriate answer is possible if you provide more detail about your data model
veranceftw
6 years agoHelper II
That did not work, az38
Well my model is very simple.
I have a dataset where each row corresponds to a match. Every match has the player_ref, team_ref and the stat.
Since a group of players share the same team, I am using the team_ref as a proxy to group the players. However, when I do that like the image I posted it returns the average instead of the sum of all the players.
Thank you,
Luís