cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Frequent Visitor

## average waiting time

How to calculate average waiting time where we have 1 column named attribute, which has anchroge and terminal and we have 1 entry date coumn now we need to calculate the waiting time between anchroge and terminal.

1 ACCEPTED SOLUTION
Community Support

Hi @Rucha_Yede ,

Here I create a sample to have a test.

Measure:

``````Avg Datediff =
VAR _SUMMAIRZE =
SUMMARIZE (
'Table',
'Table'[Category],
"DateDiff",
VAR _Anchroge =
CALCULATE ( MAX ( 'Table'[Entry Date] ), 'Table'[Attribute] = "Anchroge" )
VAR _Terminal =
CALCULATE ( MAX ( 'Table'[Entry Date] ), 'Table'[Attribute] = "Terminal" )
RETURN
DATEDIFF ( _Anchroge, _Terminal, DAY )
)
RETURN
AVERAGEX ( _SUMMAIRZE, [DateDiff] )``````

Result is as below.

Best Regards,
Rico Zhou

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

Community Support

Hi @Rucha_Yede ,

Here I create a sample to have a test.

Measure:

``````Avg Datediff =
VAR _SUMMAIRZE =
SUMMARIZE (
'Table',
'Table'[Category],
"DateDiff",
VAR _Anchroge =
CALCULATE ( MAX ( 'Table'[Entry Date] ), 'Table'[Attribute] = "Anchroge" )
VAR _Terminal =
CALCULATE ( MAX ( 'Table'[Entry Date] ), 'Table'[Attribute] = "Terminal" )
RETURN
DATEDIFF ( _Anchroge, _Terminal, DAY )
)
RETURN
AVERAGEX ( _SUMMAIRZE, [DateDiff] )``````

Result is as below.

Best Regards,
Rico Zhou

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

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.