Data table: How to create many columns from a field

Hello,
In index email_stats i have a field called "event_type" that can be equal to seven different values corresponding to the email status, i would like to create a column counting the occurence for each of them. I would also need with these result to create new column to display maths between them.
Is there a way to do it ? (I'm using 6.8.17)
Wanted result :


My best try is using split table but it's kind of a mess:
Thanks!

heres my best try:

Hi @JohanExpat

what's your stack version?

Also, can you post a couple of simple documents? That would help.

Thanks for your reply,
Stack: 7.10.2
Documents:

    "hits" : [
      {
        "_index" : "emailing_stats",
        "_type" : "_doc",
        "_id" : "1109743855",
        "_score" : 1.0,
        "_source" : {
          "event_id" : "1110256642",
          "user_id" : "267842",
          "user_status" : null,
          "segment" : "marketing",
          "email_type" : "Mailing tool",
          "event_type" : "Delivery",
          "date" : "2024-08-27 09:58:18",
          "language" : "en",
          "campaign" : null,
          "country" : null,
          "region" : "",
          "user_status_id" : "0",
          "email_type_id" : "12",
          "lang_id" : "0",
          "campaign_id" : "123456789",
          "country_id" : "0",
          "region_id" : "0",
          "emailing_id" : null
        }
      },
      {
        "_index" : "emailing_stats",
        "_type" : "_doc",
        "_id" : "1109743856",
        "_score" : 1.0,
        "_source" : {
          "event_id" : "1110256643",
          "user_id" : "267842",
          "user_status" : null,
          "segment" : "marketing",
          "email_type" : "Mailing tool",
          "event_type" : "Injection",
          "date" : "2024-08-27 09:58:19",
          "language" : "en",
          "campaign" : null,
          "country" : null,
          "region" : "",
          "user_status_id" : "0",
          "email_type_id" : "12",
          "lang_id" : "0",
          "campaign_id" : "123456789",
          "country_id" : "0",
          "region_id" : "0",
          "emailing_id" : null
        }
      },
      {
        "_index" : "emailing_stats",
        "_type" : "_doc",
        "_id" : "1109743893",
        "_score" : 1.0,
        "_source" : {
          "event_id" : "1110256680",
          "user_id" : "267842",
          "user_status" : null,
          "segment" : "marketing",
          "email_type" : "Mailing tool",
          "event_type" : "Open",
          "date" : "2024-08-27 09:58:46",
          "language" : "en",
          "campaign" : null,
          "country" : null,
          "region" : "",
          "user_status_id" : "0",
          "email_type_id" : "12",
          "lang_id" : "0",
          "campaign_id" : "123456789",
          "country_id" : "0",
          "region_id" : "0",
          "emailing_id" : null
        }
      }
    ]

As you can see the targeted field is "event_type"
Thanks

hey, any news ?

Sorry, you mean something like this?

No, something like the wanted result exemple i posted first, with sent , open and click creating a column where the count is displayed in the row

So something like that:

Added lens

yes but i belive it's not available in my version, any alternative maybe ?

Unfortunately that stack version is very old.

should i update the whole stack or just kibana to get the correct filters will be good enough ?

Upgrade the entire stack is required in this case.

thanks !