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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

YTD Average of a YoY% Measure

Hello. I am struggling with a certain calculation for a measure. I have a table which has data like below:

 

DateNameValue
11/1/2019Gas128
12/1/2019Gas111
1/1/2020Gas89
2/1/2020Gas131

11/1/2019

Solid330
12/1/2019Solid364
1/1/2020Solid396
2/1/2020Solid412


I would like to create a YTD Average of Year over year % calculation. I made the YoY% as a measure, however it seems I cannot use a measure for average in another measure.

What I had so far was:

CALCULATE(
AVERAGE('Commodities'[YoY%]) ,
DATESYTD( 'Dim_Calendar'[CALENDAR_DATE].[Date])
)

 

I am not quite sure how to utilize DAX to create this measure. Any help would be appreciated. 

Thanks!

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

Can you change the measure YoY% to calculate column? If you can't, could you show the expression of this measure?

 

Regards,

Jimmy Tao

Anonymous
Not applicable

You can specify the "aggregation level" to calculate the average something like this:
 
CALCULATE(
AVERAGEX(VALUES('Commodities[Name]), 'Commodities'[YoY%]) ,
DATESYTD( 'Dim_Calendar'[CALENDAR_DATE].[Date])
)
 
It will calculate the YoY% for each commodity and then take the average.
 
Best Regards
// Ulf

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.