# Create a table with different values

**URL:** <https://discuss.elastic.co/t/create-a-table-with-different-values/361388>\
**Category:** Kibana\
**Tags:** visualisation\
**Created:** [June 13, 2024, 10:52am UTC](https://discuss.elastic.co/t/create-a-table-with-different-values/361388 "2024-06-13T10:52:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![juandres117](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@juandres117](https://discuss.elastic.co/u/juandres117)\
**Post date:** [June 13, 2024, 10:52am UTC](https://discuss.elastic.co/t/create-a-table-with-different-values/361388/1 "2024-06-13T10:52:56Z")

</div>

Hello everyone,  
Sorry to bother you but I am having problems trying to create a table. I have created an index that has a country and like 23 types of different risks. Every risk has three fields. It's name, the type (Low, High, ...) and a value (from 1-5).

I am willing to create a filter that for an specific country, shows all of the risks. However, I am finding problems with how I have defined the risks.

```auto
{
  "seerist_riesgo_arrays": {
    "mappings": {
      "_meta": {
        "created_by": "file-data-visualizer"
      },
      "properties": {
        "countryCode": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "countryName": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "risks": {
          "properties": {
            "labels": {
              "type": "text",
              "fields": {
                "keyword": {
                  "type": "keyword",
                  "ignore_above": 256
                }
              }
            },
            "name": {
              "type": "text",
              "fields": {
                "keyword": {
                  "type": "keyword",
                  "ignore_above": 256
                }
              }
            },
            "value": {
              "type": "long"
            }
          }
        }
      }
    }
  }
}

```

This is the mapping and I am willing to recreate something like this.

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

How should I define every risk? I may have to define every risk by itself?

Thank you for your time and sorry to bother.  
Best regards

---

<div class="post-metadata">

**Author:** ![juandres117](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@juandres117](https://discuss.elastic.co/u/juandres117)\
**Post date:** [June 13, 2024, 11:03am UTC](https://discuss.elastic.co/t/create-a-table-with-different-values/361388/2 "2024-06-13T11:03:54Z")

</div>

In order to expand the information, I have submitted my info in a ndjson, like this:

{"countryName": "Cook Islands", "countryCode": "COK", "risks": [{"name": "political stability", "labels": "Medium", "value": 3}, {"name": "regulatory", "labels": "Medium", "value": 3}, {"name": "contract", "labels": "Medium", "value": 3}, {"name": "integrity", "labels": "Medium", "value": 3}, {"name": "sovereign", "labels": "Medium", "value": 3}, {"name": "political", "labels": "Medium", "value": 3}, {"name": "institutional", "labels": "Medium", "value": 3}, {"name": "infrastructure", "labels": "Medium", "value": 3}, {"name": "labour", "labels": "Medium", "value": 3}, {"name": "operational", "labels": "Medium", "value": 3}, {"name": "crime", "labels": "Very Low", "value": 1}, {"name": "terrorism", "labels": "Very Low", "value": 1}, {"name": "war", "labels": "Very Low", "value": 1}, {"name": "civil unrest", "labels": "Very Low", "value": 1}, {"name": "kidnap", "labels": "Very Low", "value": 1}, {"name": "security", "labels": "Very Low", "value": 1}, {"name": "war (maritime)", "labels": "Very Low", "value": 1}, {"name": "terrorism (maritime)", "labels": "Very Low", "value": 1}, {"name": "kidnap (maritime)", "labels": "Very Low", "value": 1}, {"name": "hijack", "labels": "Very Low", "value": 1}, {"name": "theft/robbery", "labels": "Very Low", "value": 1}, {"name": "activism", "labels": "Very Low", "value": 1}, {"name": "maritime", "labels": "Very Low", "value": 1}]}
