# How to get Combined results on tooltip in kibana maps

**URL:** <https://discuss.elastic.co/t/how-to-get-combined-results-on-tooltip-in-kibana-maps/311894>\
**Category:** Kibana\
**Tags:** maps\
**Created:** [August 11, 2022, 6:13am UTC](https://discuss.elastic.co/t/how-to-get-combined-results-on-tooltip-in-kibana-maps/311894 "2022-08-11T06:13:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ritikapawar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ritikapawar/32/98580_2.png) [@Ritikapawar](https://discuss.elastic.co/u/Ritikapawar)\
**Post date:** [August 11, 2022, 6:13am UTC](https://discuss.elastic.co/t/how-to-get-combined-results-on-tooltip-in-kibana-maps/311894/1 "2022-08-11T06:13:22Z")

</div>

I'm visualizing map on kibana-  
guess if I have 4 layers on map

1. shows the map for bihar state

2.shows the 10 pointers of hospitals in bihar.  
(fields: No of hospital, Name of hospital)

1. Shows no of doctors in each hospital.  
(field: No of Hospital, No of doctors)

4.Shows the name of specialist in each hospital.  
(field: no of Hospital, Name of specialist)

and all this 3 files of details have a common field as **Hospital\_no**

I want the the combined results for all layers in tooltip as-

_ **No of hospital: 1** _  
_ **Name of hospital: city hospital** _  
_ **No of doctors: 10** _  
_ **Name of specialist : Ritika pawar** _

Is it possible to show the results in this way?

---

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [August 11, 2022, 8:58am UTC](https://discuss.elastic.co/t/how-to-get-combined-results-on-tooltip-in-kibana-maps/311894/2 "2022-08-11T08:58:39Z")

</div>

Tooltips work only individually per geometry and layer so there's no direct way to do what you want.

The only option I see, apart from joining the data before indexing, is to create some transformation that puts together all the data using the enrich processor.

I would try to generate a new index with the hospitals with an associated ingest pipeline with enrich processors for doctors and specialists to basically "denormalize" your data structure.

You have a tutorial about the enrich processor here

> **[Enrich your data | Elasticsearch Guide \[8.3\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest-enriching-data.html)**

---

<div class="post-metadata">

**Author:** ![Hendrik\_Muhs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hendrik_muhs/32/25802_2.png) [@Hendrik\_Muhs](https://discuss.elastic.co/u/Hendrik_Muhs)\
**Post date:** [August 12, 2022, 6:36am UTC](https://discuss.elastic.co/t/how-to-get-combined-results-on-tooltip-in-kibana-maps/311894/3 "2022-08-12T06:36:21Z")

</div>

Another way of joining your data is a [transform](https://www.elastic.co/guide/en/elasticsearch/reference/current/transforms.html). You can define all 3 inputs as `source` and group by `Hospital_no`. To pick the fields in the aggregation part you can use a `top_metrics` aggregation if you e.g. have some sort of timestamp in your data. Otherwise you have to write a script using `scripted_metric`. I strongly suggest `top_metrics` as I will explain below.

A transform writes results into a new index which you can easily query and create your tooltips. A transform can run in continuous mode, that means in case you update e.g. the name of a doctor, it can automatically update the combined index in the background. For such a self-updating solution you must have timestamps in your data. If you don't have timestamp you can create one at ingest as described [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/transform-checkpoints.html#sync-field-ingest-timestamp). And once you have timestamps you can use `top_metrics` for the aggregation part of the transform.

I hope this helps and isn't too overwhelming, if you are interested in transform, there is a UI which should help you to set this up and our documentation contains a lot of examples, including one for [`top_metrics`](https://www.elastic.co/guide/en/elasticsearch/reference/current/transform-examples.html#example-customer-names).

---

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [August 25, 2022, 6:53am UTC](https://discuss.elastic.co/t/how-to-get-combined-results-on-tooltip-in-kibana-maps/311894/4 "2022-08-25T06:53:50Z")

</div>

Sorry for the very late (better) response, and apologies for missing this but Elastic Maps does actually have a term join layer that you can use with your own data, check the documentation and try to use the `top term` aggregation to show the associated data

> **[Term join | Kibana Guide \[8.4\] | Elastic](https://www.elastic.co/guide/en/kibana/current/terms-join.html)**
>
> Add interactive capabilities to your dashboard, such as controls that allow you to apply dashboard-level filters, and drilldowns that allow you to navigate to other dashboards and external websites.

That should be a good full-browser solution to your issue.

Hope it helps, cheers!

---

<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 22, 2022, 6:54am UTC](https://discuss.elastic.co/t/how-to-get-combined-results-on-tooltip-in-kibana-maps/311894/5 "2022-09-22T06:54:21Z")

</div>

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