# Kibana Visualize for nested field

**URL:** https://discuss.elastic.co/t/kibana-visualize-for-nested-field/356299
**Category:** Kibana
**Tags:** visualisation
**Created:** [March 27, 2024, 2:47pm UTC](https://discuss.elastic.co/t/kibana-visualize-for-nested-field/356299 "2024-03-27T14:47:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![bertugmete](https://avatars.discourse-cdn.com/v4/letter/b/d26b3c/32.png) [@bertugmete](https://discuss.elastic.co/u/bertugmete)
#### Post date: [March 27, 2024, 2:47pm UTC](https://discuss.elastic.co/t/kibana-visualize-for-nested-field/356299/1 "2024-03-27T14:47:33Z")

</div>

I'm trying to create a visualization in Kibana where I display the data from my Elasticsearch index in a data table format. However, when I select the "Terms" aggregation, the "violation\_list" field does not appear. My goal is to display the "key" field under a column labeled "Value" and the "doc\_count" field under a column labeled "Count". How can I achieve this?

Index Mapping;

```auto
    {
      "properties": {
        "@timestamp": {
          "format": "strict_date_optional_time||epoch_millis||yyyy-MM-DD HH:mm:ssz",
          "index": true,
          "ignore_malformed": false,
          "store": false,
          "type": "date",
          "doc_values": true
        },
        "app_log_id": {
          "type": "keyword"
        },
        "app_name": {
          "type": "keyword"
        },
        "violation_list": {
          "type": "nested",
          "properties": {
            "type": {
              "type": "keyword"
            },
            "value": {
              "type": "keyword"
            }
          }
        }
      }
    }

```

Query;

```auto
POST /xxx/_search
    {
      "size": 0,
      "aggs": {
        "violation_counts": {
          "nested": {
            "path": "violation_list"
          },
          "aggs": {
            "violation_values": {
              "terms": {
                "field": "violation_list.value",
                "size": 100
              }
            }
          }
        }
      }
    }

```

Response;

```auto
 {
      "took": 550,
      "timed_out": false,
      "_shards": {
        "total": 1,
        "successful": 1,
        "skipped": 0,
        "failed": 0
      },
      "hits": {
        "total": {
          "value": 9539,
          "relation": "eq"
        },
        "max_score": null,
        "hits": []
      },
      "aggregations": {
        "violation_counts": {
          "doc_count": 9751,
          "violation_values": {
            "doc_count_error_upper_bound": 0,
            "sum_other_doc_count": 13,
            "buckets": [
              {
                "key": "Bertug",
                "doc_count": 2610
              },
              {
                "key": "Mete",
                "doc_count": 1510
              }
              // Other buckets...
            ]
          }
        }
      }
    }

```

---

<div class="post-metadata">

### Author: ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)
#### Post date: [March 28, 2024, 2:47pm UTC](https://discuss.elastic.co/t/kibana-visualize-for-nested-field/356299/2 "2024-03-28T14:47:54Z")

</div>

Hi @bertugmete

Nested fields are currently not supported yet in our visualization editors.  
You can track the progress of its support on this issue: [Nested field support in Visualize · Issue #58175 · elastic/kibana · GitHub](https://github.com/elastic/kibana/issues/58175)

---

<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 25, 2024, 2:48pm UTC](https://discuss.elastic.co/t/kibana-visualize-for-nested-field/356299/3 "2024-04-25T14:48:23Z")

</div>

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