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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Anonymous
Not applicable

How to find the monthly average over multiple years

I have sales dating back 5 years.

I would like to find the 5 year January average, February average, etc.

Thanks!

1 ACCEPTED SOLUTION
v-angzheng-msft
Community Support
Community Support

Hi, @Anonymous 

 

You are trying to get the average of each month for the last five years right?
Why not create a matrix and change the way the values are aggregated to the average, which doesn't even require adding any additional columns or measures.

vangzhengmsft_0-1633663181117.png

 

Please correct me if I didn't understand the question correctly and consdier sharing more details about it or a simple sample file without any sesentive information for further discussion.

 

 

Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-angzheng-msft
Community Support
Community Support

Hi, @Anonymous 

 

You are trying to get the average of each month for the last five years right?
Why not create a matrix and change the way the values are aggregated to the average, which doesn't even require adding any additional columns or measures.

vangzhengmsft_0-1633663181117.png

 

Please correct me if I didn't understand the question correctly and consdier sharing more details about it or a simple sample file without any sesentive information for further discussion.

 

 

Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

DataInsights
Super User
Super User

@Anonymous,

 

Try this measure. It also works with datasets that contain more than five years:

 

Five Year Average = 
VAR vMaxYear =
    CALCULATE ( MAX ( Table1[Year] ), ALL ( Table1[Year] ) )
VAR vResult =
    CALCULATE (
        AVERAGE ( Table1[Amount] ),
        ALL ( Table1[Year] ),
        Table1[Year] >= vMaxYear - 4
    )
RETURN
    vResult

 

DataInsights_0-1633529424889.png

 





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

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.