# Mapping vars

**URL:** <https://discuss.elastic.co/t/mapping-vars/224495>\
**Category:** Kibana\
**Created:** [March 20, 2020, 10:49pm UTC](https://discuss.elastic.co/t/mapping-vars/224495 "2020-03-20T22:49:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![edkash](https://avatars.discourse-cdn.com/v4/letter/e/e19adc/32.png) [@edkash](https://discuss.elastic.co/u/edkash)\
**Post date:** [March 20, 2020, 10:49pm UTC](https://discuss.elastic.co/t/mapping-vars/224495/1 "2020-03-20T22:49:17Z")

</div>

hello dear,  
I want to know, how better way to create mapping when I need to view my agent version follow your counts. I inser with post this logs in to variables:

```auto
category: 2.34.212,
agent_count: 480 

```

```auto
mapping:
        "categories":
        {
            "type": "nested",
            "properties":
            {
                "name":
                {
                    "type": "text",
                    "store": true
                }
            }
        },
"agent_count": 
        {
            "type": "integer"
        },

```

This insert run by hour in our cron.d. When I filter by therm I have both values, but separately, follow image bellow, can we help to unify this visualization?

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/3/c/3cdf1a45511c9120acf6e4250b6ab4d3e7044a36.png)

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/9/29870f373d02ac0015789e7db1a496af55ae041c.png)

---

<div class="post-metadata">

**Author:** ![lukeelmers](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukeelmers/32/35230_2.png) [@lukeelmers](https://discuss.elastic.co/u/lukeelmers)\
**Post date:** [March 21, 2020, 2:45am UTC](https://discuss.elastic.co/t/mapping-vars/224495/2 "2020-03-21T02:45:45Z")

</div>

Hi @edkash,

Just to make sure I understand: you are trying to visualize the total `agent_count` split by `category.name`?

One way that might be more effective than a pie chart would be to do a bar chart where you put Metrics \> Sum \> Agent Count (Y-axis), and Buckets \> Terms \> Category Name (X-axis).

This would give you a chart where you could view the total agent count per category. Would that achieve what you are looking for?

---

<div class="post-metadata">

**Author:** ![edkash](https://avatars.discourse-cdn.com/v4/letter/e/e19adc/32.png) [@edkash](https://discuss.elastic.co/u/edkash)\
**Post date:** [March 23, 2020, 10:47pm UTC](https://discuss.elastic.co/t/mapping-vars/224495/3 "2020-03-23T22:47:37Z")

</div>

Hello @lukeelmers I tried with the count, but sum resolved this issue.  
thank you

---

<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:** [April 20, 2020, 10:47pm UTC](https://discuss.elastic.co/t/mapping-vars/224495/4 "2020-04-20T22:47:44Z")

</div>

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