Forum Discussion
Difference in hours between duplicates
- 6 years ago
Please find the attached solution after signature
Anonymous ,
Not sure I got it completely. But a new column will give you count in each row
countx(filter(Table,Table[SESSION_ID] = earlier(Table[SESSION_ID])),Table[Date Time ])
- parry2k6 years ago
Super User
Anonymous let me rephrase my question, same session id can have more than one duplicate, if yes, let's say session id 111 has 10 rows then how your calculation would look like? I'm not going to blindly provide a solution when I didn't know the problem in-depth.
- Anonymous6 years agoNot applicable
parry2k sorry for not being explicit.
If an id has 10 duplicates, I need to have the time difference in hours between consecutive id's. An example:
Session_ID Date Time The column I need
111 10/04/2020 10:00 NaN
111 10/04/2020 11:00 1
111 10/04/2020 12:00 1
111 10/04/2020 15:00 3
111 11/04/2020 01:00 10
112 11/04/2020 10:00 NaN
111 11/04/2020 11:00 10
- amitchandak6 years ago
Super User
Please find the attached solution after signature
- Anonymous6 years agoNot applicable
Hi amitchandak
Thank you for your reply.
What would be the output of that formula?
I tried using it, and somehow you wrote the "earlier" formula incorreclty. Also, this earlier formula won't let me input a date time.
Thank you,
Alena