# Create histogram with count of sessions

**URL:** https://discuss.elastic.co/t/create-histogram-with-count-of-sessions/143335
**Category:** Kibana
**Created:** [August 7, 2018, 1:17pm UTC](https://discuss.elastic.co/t/create-histogram-with-count-of-sessions/143335 "2018-08-07T13:17:19Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Matjo](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@Matjo](https://discuss.elastic.co/u/Matjo)
#### Post date: [August 7, 2018, 1:17pm UTC](https://discuss.elastic.co/t/create-histogram-with-count-of-sessions/143335/1 "2018-08-07T13:17:19Z")

</div>

Hi!

I have data containing userid and sessionid (each session can be several events). I would like to visualize how many sessions each user has participated in and show in a histogram something like this:  
 ![Sessions](https://us1.discourse-cdn.com/elastic/original/3X/6/5/659344c7dccf832db0d8eb6e11d33037a30475db.jpg)

Is this possible? I have not been able to figure it out using the documentations

---

<div class="post-metadata">

### Author: ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)
#### Post date: [August 7, 2018, 5:29pm UTC](https://discuss.elastic.co/t/create-histogram-with-count-of-sessions/143335/2 "2018-08-07T17:29:14Z")

</div>

Hi @Matjo,

Could you clarify, because it is not 100% clear from your example graph.

Do you want to see either:

1. the number of session for each user? in other words, each bar is a user and the length of the bar is the number of sessions.
2. the frequency of sessions-per user? in other words, each bar is the number of sessions (e.g. 1-\>n) and the length of the bar is the number of users who had that number of sessions.

?

---

<div class="post-metadata">

### Author: ![Matjo](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@Matjo](https://discuss.elastic.co/u/Matjo)
#### Post date: [August 8, 2018, 6:29am UTC](https://discuss.elastic.co/t/create-histogram-with-count-of-sessions/143335/3 "2018-08-08T06:29:14Z")

</div>

Hi Thomas!

What I want to see is the distribution of sessions among the users. The count of how many users have had 1 session, how many have had 2, 3 or 4 and more. This is so that I visualize the number of returning users.

I hope the clarifies things if not let me know and I will try and explain it in more detail.

Best regards,  
Mattias

---

<div class="post-metadata">

### Author: ![Matjo](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@Matjo](https://discuss.elastic.co/u/Matjo)
#### Post date: [August 10, 2018, 6:13am UTC](https://discuss.elastic.co/t/create-histogram-with-count-of-sessions/143335/4 "2018-08-10T06:13:57Z")

</div>

@thomasneirynck  
Is there any more information that you would need?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [September 7, 2018, 6:14am UTC](https://discuss.elastic.co/t/create-histogram-with-count-of-sessions/143335/5 "2018-09-07T06:14:15Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
