# Kibana Multi User Graph

**URL:** <https://discuss.elastic.co/t/kibana-multi-user-graph/218545>\
**Category:** Kibana\
**Created:** [February 10, 2020, 8:55am UTC](https://discuss.elastic.co/t/kibana-multi-user-graph/218545 "2020-02-10T08:55:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinu89](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinu89/32/45939_2.png) [@vinu89](https://discuss.elastic.co/u/vinu89)\
**Post date:** [February 10, 2020, 8:55am UTC](https://discuss.elastic.co/t/kibana-multi-user-graph/218545/1 "2020-02-10T08:55:35Z")

</div>

Hi,

I need to create a graph in kibana where i need to identify the list of email id's loggged in from different countries.lets say email id is [xyz@domain.com](mailto:xyz@domain.com) and the user belongs to India but his password has been compromised and the hacker has attempted from different countries. I plotted against aggregation field (buckets) ll be my email id [top 25] and the subbucket ll be the list of countries [top5]. but in this I faced a challenge in this lets say a particular user has logged in only from India and he comes under top25 he must not be listed but that user is also coming in my graph

I need only the users who has tried to logged in from different countries.please help out

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [February 10, 2020, 3:06pm UTC](https://discuss.elastic.co/t/kibana-multi-user-graph/218545/2 "2020-02-10T15:06:22Z")

</div>

If I understand the requirement correctly it is to get a list of the users with the most countries.  
In elasticsearch this would be achieved by sorting the `emailID`s by the [cardinality](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-cardinality-aggregation.html) (or "unique count") of `country`.  
In Kibana a bar chart that does this would be configured like this :

 ![Kibana_and_Sign_in_to_elastic](https://us1.discourse-cdn.com/elastic/original/3X/4/a/4adb1cfef5c0f29150fcc8cfb9d082160afdff66.png)

In my example I'm finding companies with the most investors but in your case it would be emails with the most countries.

---

<div class="post-metadata">

**Author:** ![vinu89](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinu89/32/45939_2.png) [@vinu89](https://discuss.elastic.co/u/vinu89)\
**Post date:** [February 11, 2020, 6:55am UTC](https://discuss.elastic.co/t/kibana-multi-user-graph/218545/3 "2020-02-11T06:55:41Z")

</div>

Thanks a lot Mark...It worked

---

<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:** [March 10, 2020, 7:09am UTC](https://discuss.elastic.co/t/kibana-multi-user-graph/218545/4 "2020-03-10T07:09:46Z")

</div>

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