Forum Discussion
Anonymous
6 years agoNot applicable
Splitting table rows from value
Hello, I need to calculate the duration between Events for each particular user working in a specific file in a datasource that contains info from multiple users. Sample table below. The goal...
- 6 years ago
Try
DateDiff = 'view-activated collected'[DateTime] - MINX(FILTER('view-activated collected', 'view-activated collected'[DocPath] = EARLIER('view-activated collected'[DocPath]) && 'view-activated collected'[Username] = EARLIER('view-activated collected'[Username]) && 'view-activated collected'[DateTime] > EARLIER('view-activated collected'[DateTime]) ),'view-activated collected'[DateTime])
amitchandak
6 years agoSuper User
Try
DateDiff = 'view-activated collected'[DateTime] - MINX(FILTER('view-activated collected',
'view-activated collected'[DocPath] = EARLIER('view-activated collected'[DocPath])
&& 'view-activated collected'[Username] = EARLIER('view-activated collected'[Username])
&& 'view-activated collected'[DateTime] > EARLIER('view-activated collected'[DateTime])
),'view-activated collected'[DateTime])Anonymous
6 years agoNot applicable
It is working very well, thank you.
Found an unintended consequence of the requirement, though.
Can the last DateDiff calculation for the last entry for user+docpath be set to 0?