Find count of 30 Mins Sessions from the given data

Screenshot 2023-07-24 at 3.29.09 PM

As we can see below the first entry to the table on 21st July 2023 is at 12:58pm. The session starts here and the next session begins at 1:28pm. So on if I keep counting, I can see 3 Sessions.

How to achieve this in quicksight? If I begin by taking min(eventtime) as my starting point, how can I keep changing my minimum to make up count the total number of 30mins sessions from the first login to last login

Here session count would go like this

  1. Session 1 : 12:58pm to 1:28pm ====> 30mins
  2. Session 2 : 1:58pm to 2:28pm ====> 30mins
  3. Session 3 : 4:00pm to 4:30pm ====> 30mins

Number of sessions = 3

1 Like

Hi @Shambhavi - Can you please explore the below approach.

  1. Create 2 calculated fields which will contain max and min value.
  2. Extract the difference of the calculated field in min ( see the link - dateDiff - Amazon QuickSight)
  3. Divide it by 30 ( min) to find the count.

Give a try to the approach.

Regards - Sanjeeb

1 Like

Hello. Thank you for this solution. I did try this approach before posting this question. The count of my sessions does not match to the sessions I am actually billed for. I am essentially trying to understand number of sessions per user in quicksight. And when I compare the count to the sessions billed, it does not match.

If you feel there is a work around, please let me know.

Thanks for your help!

@Sanjeeb2022 Adding a screenshot to the question to better understand the use case.
Screenshot 2023-07-25 at 9.48.18 AM
As you can see here,

  1. Session 1 starts at 8.06am and goes upto 8.36am ====> 30mins
  2. Session 2 starts at 9.48am and goes upto 10.18am =====> 30mins
  3. Session 3 starts at 10.19am and goes upto 10.49am =====> 30mins

So I am getting billed for 3 sessions on 20th July.

If I use min and max logic, I get min = 8.06am and max = 10:20am which is 134mins.
134/30 = 4.4 ~ 4 sessions.

But that is wrong in terms of count. The actual number of sessions is 3.

Hope this clarifies the question and what I am trying to achieve in here.

Hello @Shambhavi - Since a few months have passed from your original post I am going to archive this question. If you still need assistance with this please post a new question in the Quick Sight community and link to this topic. Due to the community focus on responding to questions with 0 replies, this will ensure you are a top priority for help from one of our Quick Sight experts. Thank you!