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
Rwcoops88
New Member

Calculating Average Age based on number of licences per age

Hi,

 

Im very new with Power Bi, I'm trying hard to learn but struggling with some areas of it. Im trying to generate a card that will show the average age of staff that have a licence. My spreadsheet is similar to the below: 

 

AgeNumber of Licences
241
250
262
270
281
292

 

When I have tried to use quick measure It doesnt seem to be working correctly however I may be misunderstanding the set up. 

 

Thanks,

 

Robin

5 REPLIES 5
Rwcoops88
New Member

Excel Screen Shot.JPG

What is your expected output???
You shared your input only. we want to understand what do you want to see in the output?
shared expected result by typing into excel.

Don't forget to give thumbs up and accept this as a solution if it helped you!!!
Uzi2019
Super User
Super User

Hi @Rwcoops88 
Would you please provide input data and expected output you want in simple excel screen shot?
just simple columns and its values in columns

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Im not sure on the figure that will be shown, I want an average age on the licence holders in AGE. I have entered the age 44 as I expect it will be around this age. 

Excel Screen Shot 2.JPG

Hi @Rwcoops88 

 

Uzi2019_0-1697196895375.png

I have taken your input and done the calculation where it display the average of age when No of License >0.

you can create following formula in measure:

Avg_age = CALCULATE(AVERAGE('Age table'[Age]),FILTER('Age table',SUM('Age table'[No of License])>0))

If I answered your question please give kudos and accept my solution!
Thank you.



Don't forget to give thumbs up and accept this as a solution if it helped you!!!

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.