Forum Discussion
RoxanaZaharia
2 years agoHelper I
Average age per year as integer
Hi! I'm fairly new to using Power BI. So 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:
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:
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)
1 Reply
- samratpbiSuper 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)