# How to create Visualization from calculated field on Kibana

**URL:** https://discuss.elastic.co/t/how-to-create-visualization-from-calculated-field-on-kibana/164830
**Category:** Kibana
**Tags:** elastic-stack-monitoring
**Created:** [January 18, 2019, 4:20pm UTC](https://discuss.elastic.co/t/how-to-create-visualization-from-calculated-field-on-kibana/164830 "2019-01-18T16:20:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Wassim\_Ben\_Amor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wassim_ben_amor/32/39799_2.png) [@Wassim\_Ben\_Amor](https://discuss.elastic.co/u/Wassim_Ben_Amor)
#### Post date: [January 18, 2019, 4:20pm UTC](https://discuss.elastic.co/t/how-to-create-visualization-from-calculated-field-on-kibana/164830/1 "2019-01-18T16:20:17Z")

</div>

I'm new to Elasticsearch and Kibana.  
I have a simple index which contains documents representing user requests in dialogs.  
Each request has a user\_id and session\_id. I want to create a Pie graph like this :

 ![](https://i.stack.imgur.com/NEHz6.png)  
showing how much dialogs for each user grouped by number of dialogs. I couldn't make this using kibana create Visualization tool. I have tried to make it with SQL request but it doesn't work. Here an example of the simple dataset :  
 ![](https://i.stack.imgur.com/d0xKC.png)  
after this, I made a query to show for each user, how much dialogs he has :  
 ![](https://i.stack.imgur.com/0bSsZ.png)  
and finally I have tried to group the dialog count to obtain the result needed to create the Pie but it bugs  
 ![](https://i.stack.imgur.com/QVsox.png)  
If this isn't possible on Kibana, how can data analysts create complex graphs based on calculated fields ? Please HELP. Thank you.

---

<div class="post-metadata">

### Author: ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)
#### Post date: [January 24, 2019, 10:32pm UTC](https://discuss.elastic.co/t/how-to-create-visualization-from-calculated-field-on-kibana/164830/2 "2019-01-24T22:32:53Z")

</div>

The data you have is pretty raw for the type of pie chart you want. It will need to be rolled up a bit before you can aggregate on the different counts of conversations that users have.

I helped out someone with a sort-of similar question here: [Histogram (bars) with counts as bins](https://discuss.elastic.co/t/histogram-bars-with-counts-as-bins/149405) would you mind taking a look and seeing if this is a similar use case you have?

---

<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: [February 21, 2019, 10:33pm UTC](https://discuss.elastic.co/t/how-to-create-visualization-from-calculated-field-on-kibana/164830/3 "2019-02-21T22:33:00Z")

</div>

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