# How to combine url string field in kibana bar chart visualization?

**URL:** https://discuss.elastic.co/t/how-to-combine-url-string-field-in-kibana-bar-chart-visualization/247206
**Category:** Kibana
**Created:** [September 2, 2020, 9:29am UTC](https://discuss.elastic.co/t/how-to-combine-url-string-field-in-kibana-bar-chart-visualization/247206 "2020-09-02T09:29:15Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![S\_Zaman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/s_zaman/32/74946_2.png) [@S\_Zaman](https://discuss.elastic.co/u/S_Zaman)
#### Post date: [September 2, 2020, 9:29am UTC](https://discuss.elastic.co/t/how-to-combine-url-string-field-in-kibana-bar-chart-visualization/247206/1 "2020-09-02T09:29:15Z")

</div>

using apm I have collected my application logs and there I found url data like

[abc.com/edit/1](http://abc.com/edit/1)  
[abc.com/edit/2](http://abc.com/edit/2)  
[abc.com/edit/3](http://abc.com/edit/3)

[abc.com/update/1](http://abc.com/update/1)  
[abc.com/update/3](http://abc.com/update/3)  
[abc.com/update/5](http://abc.com/update/5)

what I am trying to do is I want to plot number of total update vs total edit operation calls. But when I am creating bar chart, it treats [abc.com/update/1](http://abc.com/update/1)  
[abc.com/update/3...as](http://abc.com/update/3...as) different line. How can I calculate [abc.com/update/\*](http://abc.com/update/*) vs  
[abc.com/edit/\*](http://abc.com/edit/*) ?  
I selected Terms\>url.path and there is no other option to provide additional formatting. This might be a very easy problem but I am new to elastic and kibana so please accept my apology.

---

<div class="post-metadata">

### Author: ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)
#### Post date: [September 10, 2020, 7:41pm UTC](https://discuss.elastic.co/t/how-to-combine-url-string-field-in-kibana-bar-chart-visualization/247206/2 "2020-09-10T19:41:45Z")

</div>

It sounds like your indexed data isn't in the shape you want it to be for analysis, but it's close. You can either index the data in the shape you want for analysis, or you can extract the relevant pieces at runtime by creating a "scripted field" in your Kibana index pattern using the Painless scripting language.

Indexing the data in the right shape for analysis is the preferred method, and you could use [ingest pipelines](https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest.html) to do this

---

<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: [October 8, 2020, 7:41pm UTC](https://discuss.elastic.co/t/how-to-combine-url-string-field-in-kibana-bar-chart-visualization/247206/3 "2020-10-08T19:41:49Z")

</div>

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