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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
GA1993
Helper II
Helper II

Showing average time calculation based on completed date

Hello,

 

How do I show the average number of days of a certain month depending on the "Completed Date" field even though it is filtered as differently as shown below?

 

For example, I have selected December 2021, based on the report details only 1 order was completed with 20 days as the average time. However, as seen below, it accounts for the "Order Date" field, hence, calculating (32+20+26)/3 = 26 days.

 

I would like to show it as:

December 2021 - 20 ave days for 1 order

January 2022 - 29 ave days for 2 orders (32+26)/2 = 29

 

 

GA1993_1-1646628804020.png

 

GA1993_0-1646628777090.png

 

1 ACCEPTED SOLUTION

Hi @GA1993 ,

 

Create a inactive relationship between sheet1 and tac_cal on date and completed date.

vchenwuzmsft_0-1646892704726.png

Then create a measure named AVG.

AVG = 

AVG = CALCULATE(AVERAGE(Sheet1[new total days]),USERELATIONSHIP(Tab_cal[Date],Sheet1[Completed Date]))
 
Result:
vchenwuzmsft_1-1646892812417.png

Pbix file in the end you can refer.

Best Regards

Community Support Team _ chenwu zhu

 

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

6 REPLIES 6
GA1993
Helper II
Helper II

GA1993_0-1646682158298.png

 

How do I insert a pbix file here? I couldnt find an icon to click...

 

amitchandak
Super User
Super User

@GA1993 , Based on what I got

 

calculate( AverageX(Values('Date'[Month Year]) , [Total Days]) , allselected())

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

This is what I got 😕

 

 

GA1993_0-1646632434403.png

 

@GA1993 ,
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @GA1993 ,

 

Create a inactive relationship between sheet1 and tac_cal on date and completed date.

vchenwuzmsft_0-1646892704726.png

Then create a measure named AVG.

AVG = 

AVG = CALCULATE(AVERAGE(Sheet1[new total days]),USERELATIONSHIP(Tab_cal[Date],Sheet1[Completed Date]))
 
Result:
vchenwuzmsft_1-1646892812417.png

Pbix file in the end you can refer.

Best Regards

Community Support Team _ chenwu zhu

 

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors