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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
JB17
Frequent Visitor

DAX Formula

hi, good day! I'm newbie to powerbi. Can someone help me with DAX formula? I was trying to get the average per month wherein there are four scores per month. Similar to below table but for 12 months.

 

JB17_0-1653976614307.png

 

Would really appreciate your help! Thanks in advance!

 

1 ACCEPTED SOLUTION
v-xiaotang
Community Support
Community Support

Hi @JB17 

You can try this,

average = 
var _date= MIN('Table'[Date])
return AVERAGEX(FILTER(ALL('Table'),YEAR( 'Table'[Date])= YEAR(_date) && MONTH('Table'[Date])= MONTH(_date)),[Score])

result

vxiaotang_0-1654245226634.png

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
tamerj1
Super User
Super User

Hi @JB17 
Please provide more details about your source data. It really depends

ValtteriN
Super User
Super User

Hi,

You can create a relationship between your fact table and calendar table and then use DAX similar to this:

Monthly average =
var _year = YEAR(MAX('Calendar'[Date]))
var _month = MONTH(MAX('Calendar'[Date]))
return

CALCULATE(AVERAGE(Aggregation[Duration(Secs)]),ALL('Calendar'[Date]),
'Calendar'[Year]=_year,
'Calendar'[Month]=_month)


Here we use ALL to remove date filter and then use variables to return the context on month and year level. By doign this we can get monthly averages.

ValtteriN_0-1653981703830.png

 




I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




v-xiaotang
Community Support
Community Support

Hi @JB17 

You can try this,

average = 
var _date= MIN('Table'[Date])
return AVERAGEX(FILTER(ALL('Table'),YEAR( 'Table'[Date])= YEAR(_date) && MONTH('Table'[Date])= MONTH(_date)),[Score])

result

vxiaotang_0-1654245226634.png

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric 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.

Users online (27)