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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
ashsandwich
New Member

Turning year to date sum to year to date average

Hi, I have a measure that sums the data year to date. I'm now looking to have an average year to date. This is my formula, is there anything I can do here to average instead of sum? Thanks very much. 

 

YTD Sum = CALCULATE([Headcount Count Calc],DATESINPERIOD(data[Extract Date],max(data[Extract Date]), -12,MONTH))
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @ashsandwich ,

I think you can use AVERAGE function. Here is the changed DAX codes.

YTD Average =
CALCULATE (
    AVERAGE ( data[Headcount Count Calc] ),
    DATESYTD ( data[Extract Date] )
)

If you want to learn more about AVERAGE function. I think you can read this document: AVERAGE function (DAX) - DAX | Microsoft Learn

 

 

 

Best Regards

Yilong Zhou

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

1 REPLY 1
Anonymous
Not applicable

Hi @ashsandwich ,

I think you can use AVERAGE function. Here is the changed DAX codes.

YTD Average =
CALCULATE (
    AVERAGE ( data[Headcount Count Calc] ),
    DATESYTD ( data[Extract Date] )
)

If you want to learn more about AVERAGE function. I think you can read this document: AVERAGE function (DAX) - DAX | Microsoft Learn

 

 

 

Best Regards

Yilong Zhou

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

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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