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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. 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
v-yilong-msft
Community Support
Community Support

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
v-yilong-msft
Community Support
Community Support

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.