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
Anonymous
Not applicable

Calculate averag load time per month and create a trendline for 2021 and 2022

Now my issue is I try to calculate Average Load Time - I need to measures one for 2021 and one for 2022 as I want to use them in the 2 line trendline. But I get exactly the same result...why?
What I want i to build a trendline month by month similar to this one:
justyna_kmiecik_0-1653320085101.png

 

 

 
 
Avg Completion Time 2021 = CALCULATE(
AVERAGE('Daily Issues'[LoadTime]),'Date Table'[Year]=MAX('Date Table'[Year])-1)
 
Avg Completion Time 2022 = CALCULATE(
AVERAGE('Daily Issues'[LoadTime]),'Date Table'[Year]=MAX('Date Table'[Year]))
 
My table is linked to Date Table but I also have Year in my original parent table:
 
justyna_kmiecik_1-1653320085297.png

 

I also tried this but not ok...

 

AverageMonthLoad = AVERAGE('Daily Issues'[LoadTime])/DISTINCTCOUNT('Date Table'[Month Sort])
 
my date table looks like this:
 
justyna_kmiecik_2-1653320148546.png

 

3 REPLIES 3
v-eqin-msft
Community Support
Community Support

Hi @Anonymous ,

 

Could you please provide more details about your Daily Issues table to help us clarify your scenario?

Like the columns fields, the relationship between Daily Issues table and Date table and your expected average values.

Or if possible, please share me with your pbix file after removing sensitive data.

Refer to:

How to Get Your Question Answered Quickly - Microsoft Power BI Community

How to provide sample data in the Power BI Forum - Microsoft Power BI Community

 

 

Best Regards,
Eyelyn Qin

Anonymous
Not applicable

ot working....the result still shows a generic average and not per month as you see, and also not separated by year...I need to filter 2022 or 2021 to see the actual result, but anyway I need to see average per month

justyna_kmiecik_0-1653377955138.png

 

 

 

amitchandak
Super User
Super User

@Anonymous , try like

 

AverageX (values('Date Table'[Month Sort]), calculate(AVERAGE('Daily Issues'[LoadTime]),'Date Table'[Year]=MAX('Date Table'[Year])-1))

 

or

 

 

calculate(AverageX (values('Date Table'[Month Sort]), calculate(AVERAGE('Daily Issues'[LoadTime])),'Date Table'[Year]=MAX('Date Table'[Year])-1))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

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

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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