cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

New Member

## 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
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)
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)

Announcements

#### Fabric certifications survey

Certification feedback opportunity for the community.

#### Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

#### Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors