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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
RoxanaZaharia
Helper I
Helper I

Average age per year as integer

Hi! I'm fairly new to using Power BISo I downloaded this data set from kaggle: https://www.kaggle.com/datasets/krishd123/olympics-legacy-1896-2020 , and i am trying to show average age for each individual year. I've tried creating a measure using this:

Average Age per Year = INT(AVERAGEX(VALUES('All Athlete Games'[Year]), AVERAGE('All Athlete Games'[Age])))
 
This is the result i get:
RoxanaZaharia_1-1710514247302.png

It would be more accurate to round the result of the AVERAGE function to the nearest whole number? 

I've tried this way too using this measure:

Average Age per Year = ROUND(AVERAGEX(VALUES('All Athlete Games'[Year]), AVERAGE('All Athlete Games'[Age])), 0)
 
But in this case how do i make it return an integer? Because this is my result:
RoxanaZaharia_2-1710514531647.png

 

1 ACCEPTED SOLUTION
samratpbi
Super User
Super User

when you select your measure, at top toolbar, there is an option Measure Tools then change the Format of the measure to whole number from there ( by default General appears)

View solution in original post

1 REPLY 1
samratpbi
Super User
Super User

when you select your measure, at top toolbar, there is an option Measure Tools then change the Format of the measure to whole number from there ( by default General appears)

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.