Forum Discussion
Average time between emails
- 1 year ago
hello Anonymous
please check if this accomodate your need.
1. create a new measure for calculating 'Get Time from Previous Email'
Get Time from Previous Email =
var _ID = SELECTEDVALUE('Table'[email_ID])
Return
MAXX(
FILTER(
ALL('Table'),
'Table'[email_ID]<_ID
),
'Table'[received]
)2. create a new measure for calculating 'Time Difference' since you want to see the average time
Time Difference =
var _Received = SELECTEDVALUE('Table'[received])
Return
DATEDIFF('Table'[Get Time from Previous Email],_Received,MINUTE)3. create a new measure for calculating 'Average'
Average = AVERAGEX('Table',[Time Duration])
4. to get average time for each customer, create a slicer with customer as the value.
Hope this will help.
Thank you.
hello Anonymous
please check if this accomodate your need.
1. create a new measure for calculating 'Get Time from Previous Email'
Get Time from Previous Email =
var _ID = SELECTEDVALUE('Table'[email_ID])
Return
MAXX(
FILTER(
ALL('Table'),
'Table'[email_ID]<_ID
),
'Table'[received]
)
2. create a new measure for calculating 'Time Difference' since you want to see the average time
Time Difference =
var _Received = SELECTEDVALUE('Table'[received])
Return
DATEDIFF('Table'[Get Time from Previous Email],_Received,MINUTE)
3. create a new measure for calculating 'Average'
Average = AVERAGEX('Table',[Time Duration])
4. to get average time for each customer, create a slicer with customer as the value.
Hope this will help.
Thank you.