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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
IsaacH
Regular Visitor

DAX Average of Months Over Span of Years

I am looking to create a dax measure to find the average for each month over the span of many years to extrapulate seasonal trends (ex. finding the average of all January's, February's, March's, etc. from 2014-2022). 

This is my current code:

Monthly Average Industry =
var monthlytotal = SUMX(VALUES('Calendar'[MonthName]),'Sales'[Amount])
var distinctyear = DISTINCTCOUNT('Calendar'[Year])
return
    DIVIDE(monthlytotal,distinctyear)
 
Any help would be great 🙂
1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @IsaacH ,

 

try like:

Monthly Average Industry =
var monthlytotal = SUMX(VALUES('Calendar'[MonthName]), CALCULATE(SUM('Sales'[Amount])))
var distinctyear = DISTINCTCOUNT('Calendar'[Year])
return
    DIVIDE(monthlytotal,distinctyear)

View solution in original post

1 REPLY 1
FreemanZ
Super User
Super User

hi @IsaacH ,

 

try like:

Monthly Average Industry =
var monthlytotal = SUMX(VALUES('Calendar'[MonthName]), CALCULATE(SUM('Sales'[Amount])))
var distinctyear = DISTINCTCOUNT('Calendar'[Year])
return
    DIVIDE(monthlytotal,distinctyear)

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.