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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Tripb44
Helper II
Helper II

Average Time(Days) In location

I am needing a calculation to get the average time in location between rows in groups.  Below is the current data structure and desired output.

Data:

JOBLOCATIONTIME
1a8/21/2021
1b8/22/2021
1c8/23/2021
1d8/24/2021
2a8/21/2021
2b8/22/2021
2c8/23/2021
2d8/24/2021



Output:

LocationAverage Time(Days) In location
a 
b 
c 
d 

 

2 REPLIES 2
v-angzheng-msft
Community Support
Community Support

Hi, @Tripb44 

 

try to create a measure like this

_date = 
DATE(1899,12,30)+AVERAGE('Table'[TIME])

result:

vangzhengmsft_1-1629949351585.png

Please refer to the attachment below for details. Hope this helps.

If I did not understand your question correctly, please consdier sharing more details about it.

 

Best Regards,
Community Support Team _ Zeon Zheng


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

Greg_Deckler
Community Champion
Community Champion

@Tripb44 Maybe:

Measure = 
  VAR __Table = ADDCOLUMNS(SUMMARIZE('Data',[LOCATION],[JOB],"__Max",MAX('Data'[TIME]),"__Min",MIN('Data'[TIME])),"__Duration",([__Max] - [__Min]) *1.)
RETURN
  AVERAGEX(__Table,[__Duration])


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.