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

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

Reply
khenneke
New Member

Monthly average over several years

I need help with getting the average per month over several years. Instead of the total I need it to be the average. 

I have a measure of total. and a Date table. But I can't figure out how to get the average. 

 

khenneke_0-1663687274770.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@khenneke , Try a measure like below with help from date table

 

Cumm = CALCULATE(averageX(values('Date'[Month Year]),calculate(SUM(Sales[Sales Amount]))) ,filter(allselected('Date'),'Date'[date] <=max('Date'[date])))

 

 

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@khenneke , Try a measure like below with help from date table

 

Cumm = CALCULATE(averageX(values('Date'[Month Year]),calculate(SUM(Sales[Sales Amount]))) ,filter(allselected('Date'),'Date'[date] <=max('Date'[date])))

 

 

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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