# Building visualization in kibana by removing and grouping part of the value

**URL:** <https://discuss.elastic.co/t/building-visualization-in-kibana-by-removing-and-grouping-part-of-the-value/256502>\
**Category:** Kibana\
**Created:** [November 24, 2020, 12:20pm UTC](https://discuss.elastic.co/t/building-visualization-in-kibana-by-removing-and-grouping-part-of-the-value/256502 "2020-11-24T12:20:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sivajanani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sivajanani/32/75053_2.png) [@Sivajanani](https://discuss.elastic.co/u/Sivajanani)\
**Post date:** [November 24, 2020, 12:20pm UTC](https://discuss.elastic.co/t/building-visualization-in-kibana-by-removing-and-grouping-part-of-the-value/256502/1 "2020-11-24T12:20:20Z")

</div>

Hello All,

I have a field tag in which I have two kinds of values as below,  
tags: targetgeo:china,targetgeo:iran,geolocation:australia,geolocation:china

I wanted to group and visualize using geo field values i.e china-2,iran-1,australia-1

But currently I am getting targetgeo:china-1,targetgeo:iran-1,geolocation:australia-1,geolocation:china-1  
Is there anyway I can parse the field after :and can visualize?

Also I can see some blogs where I can achive this using script field. Can somebody guide me with this as I am new to scripting and KQL.

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [November 30, 2020, 8:56am UTC](https://discuss.elastic.co/t/building-visualization-in-kibana-by-removing-and-grouping-part-of-the-value/256502/2 "2020-11-30T08:56:54Z")

</div>

I recommend doing the parsing and splitting at ingest, but if you just want to try, the documentation for scripted fields is here: [https://www.elastic.co/guide/en/kibana/current/scripted-fields.html](https://www.elastic.co/guide/en/kibana/current/scripted-fields.html)  
Most of the reference is linked in there.

---

<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:** [December 28, 2020, 8:56am UTC](https://discuss.elastic.co/t/building-visualization-in-kibana-by-removing-and-grouping-part-of-the-value/256502/3 "2020-12-28T08:56:57Z")

</div>

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