Forum Discussion
knmath01
4 years agoAdvocate I
Date Diff based on Multiple Daily Sessions
Hello! I have looked around for the last couple days on here and tried several different calculated columns and measure's but I can't quite get to what I am looking for. I want to calculate the s...
amitchandak
4 years agoSuper User
knmath01 , Create a new column
new column =
var _max = minx(filter(Table, [User] = earlier([User]) && [DATE] > earlier([Date])), [Date])
var _status = minx(filter(Table, [User] = earlier([User]) && [DATE] =_max), [status])
return
if(_status = "SESSION EXPIRED", _max, blank())
nor you can ignore SESSION EXPIRED rows
- knmath014 years agoAdvocate I
amitchandak Hi, thank you for the quick response! I created a column using the above and it didn't produce any results, the whole column is blank. Below is what I did for the column:
SessionTime =var _max = minx(filter(UserSessions, [USER] = earlier([USER]) && [DATE] > earlier([DATE])), [DATE])var _status = minx(filter(UserSessions, [USER] = earlier([USER]) && [DATE].[Date] =_max), [STATUS])returnif(_status = "SESSION EXPIRED", _max, blank())