Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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 returning the average. How do I make it a sum?
Kind regards
Solved! Go to Solution.
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.
@veranceftw What is the measure for 3.99 value , I think problem should be there
Proud to be a Super User!
how does look like your measure now?
Like this:
Hi @veranceftw ,
For the value in the second table, it first calculates the sum of each teams of the two columns separately, and then divides the two sums. For example, the value 3.99 is calculated like so:
Pressure Final 3rd p90 Manchester City =
CALCULATE (
SUM ( all_match_stats[pressures_att_3rd] ),
all_match_stats[team_name] = "Manchester City"
)
/ (
CALCULATE (
SUM ( all_match_stats[minutes] ),
all_match_stats[team_name] = "Manchester City"
) / 90.0
)
It is suggested to create another measure to get sum value:
Measure = SUMX('all_match_stats',[Pressure Final 3rd p90])
I create a simple example, please check the attached .pbix file.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
That measure is returning NaN for me
Hi @veranceftw ,
If the measure I provided doesn't work, please share me your .pbix file to help you better. Please remove sensitive information and unnecessary visuals. It is suggested to upload your file to OneDrive for Business and then paste the link here.
Best Regards,
Icey
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.
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
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
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 33 | |
| 29 |
| User | Count |
|---|---|
| 134 | |
| 96 | |
| 78 | |
| 67 | |
| 65 |