Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
I would like to get the average of counts of values within a column broken up by group defined by a second column
| Sport | Method | 
| Basketball | Ball | 
| Basketball | Ball | 
| Baseball | Ball | 
| Baseball | Ball | 
| Soccer | Ball | 
| MMA | Gloves | 
| Boxing | Gloves | 
| Boxing | Gloves | 
| Boxing | Gloves | 
| Wrestling | Grapling | 
| Judo | Grapling | 
Based on the long dataset that is the source I would like to create an outcome or measure where the values I get are
| Method | Average | 
| Grapling | 1 | 
| Gloves | 2 | 
| Ball | 1.667 | 
Ball is 1.667 because Basketball has 2 rows, Baseball has 2 rows, and soccer has 1 row. (2+2+1)/3=1.667
Is a measure or table like this possible?
Solved! Go to Solution.
Hi,
Average =
VAR MyTable =
    SUMMARIZE (
        'Table',
        'Table'[Sport],
        'Table'[Method],
        "Count", COUNTROWS ( 'Table' )
    )
RETURN
    AVERAGEX ( MyTable, [Count] )Regards
@user35131 
Create a measure as follows and add to a table visual with Method
Average Sport = 
DIVIDE(
    COUNTA(Table5[Sport]),
    DISTINCTCOUNT(Table5[Sport])
)
 
⭕  Subscribe and learn Power BI from these videos
 ⚪ Website ⚪  LinkedIn ⚪  PBI User Group 
@user35131 
Create a measure as follows and add to a table visual with Method
Average Sport = 
DIVIDE(
    COUNTA(Table5[Sport]),
    DISTINCTCOUNT(Table5[Sport])
)
 
⭕  Subscribe and learn Power BI from these videos
 ⚪ Website ⚪  LinkedIn ⚪  PBI User Group 
Hi,
Average =
VAR MyTable =
    SUMMARIZE (
        'Table',
        'Table'[Sport],
        'Table'[Method],
        "Count", COUNTROWS ( 'Table' )
    )
RETURN
    AVERAGEX ( MyTable, [Count] )Regards
Thank You. I was wondering and i should have noted. Is there a way to freeze or lock the result of the average? Similar to the setup of this question. https://community.powerbi.com/t5/Desktop/Filter-by-slicer-for-one-column-but-freeze-or-lock-the-max-...
 
					
				
				
			
		
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
 
            | User | Count | 
|---|---|
| 84 | |
| 49 | |
| 36 | |
| 31 | |
| 30 |