Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Get the MIN and MAX of occurrences in a column

I have a set of game data, which is points scored by players in games they've played. Looks like this:

 

 

Player,Points
A,12
A,33
A,44
A,6
A,3
A,86
A,43
A,77
A,4
A,94
B,44
B,66
B,8
C,34
C,64
C,55
C,34
C,25
C,3

 

 

I have a measure I calculate to get the number of games played by each player, and it's pretty simple.

 

 

Games = COUNTROWS(GameData)

 

 

Now I can use this to display the number of games played by each player and total points they've scored, like so:

 

Games.png

Now, to be used elsewhere, I also want to get the max and min games played by a player in the entire data set. If we consider the above dataset, I want to get the number 10 (which is the most number of games played by any player) and 3 (which is the min), as measures.

What's the best way to do this?

 

EDIT:

I want to add that I'm looking for a way to do this without using calculated columns, the reason being that I want to get the same MAX and MIN count for other fields in my data as well, and some of them are measures calculated based on other conditions.

 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@Anonymous You should be able to do something like this:

Max Games Measure = MAXX(SUMMARIZE('Table',[Player],"__Games",[Games]),[__Games])

Min Games Measure = MINX(SUMMARIZE('Table',[Player],"__Games",[Games]),[__Games])


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@Anonymous You should be able to do something like this:

Max Games Measure = MAXX(SUMMARIZE('Table',[Player],"__Games",[Games]),[__Games])

Min Games Measure = MINX(SUMMARIZE('Table',[Player],"__Games",[Games]),[__Games])


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

That worked perfect, thanks!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors