Forum Discussion
Create sessions based on timestamp
- 8 years ago
Take a look at my MTBF article, it has a similar kind of issue that it is trying to solve. You should be able to use it to create a column that flags a session as new based upon the duration from the previous row.
Hi Greg_Deckler,
The first solution works for me with some extra mesures.
After this step I defined a mesaure to count sessions:
count_sessions = CALCULATE( COUNT('Talend_GA sessions'[new duration in min]);FILTER('Talend_GA sessions';'Talend_GA sessions'[new duration in min]>30))That gave me a result like this:
After that I defined another measure to add up the lost session count as you can see in the image above, there are three sessions as per the definition but it counts only two.
count_sessions_final = [count_sessions] + [Total sessions]
Here Total sessions is a mesure which counts the distinct session_ids.
Please do let me know what I did is correct or not.
If it works for you and gives you what you want, then it is correct! :)
Glad my article could at least point you in the right direction!
- Anonymous8 years agoNot applicable
Yeah it's working fine and I am getting correct results (as much I tested). thanks a lot for your help sir. Respect.