Data table with Sum metrics and percentage column

Hi,

I have a use case looks fairly simple but I couldn't figure out how to build a visualization for it with Kibana.

Given the following dataset:

POST /test_index/test_type/_bulk {"index":{"_id":"1"}} {"host": "www.google.com", "hits": 100} {"index":{"_id":"2"}} {"host": "www.google.com", "hits": 20} {"index":{"_id":"3"}} {"host": "www.facebook.com", "hits": 200} {"index":{"_id":"4"}} {"host": "www.yahoo.com", "hits": 80}

I was able to build a data table to show metrics as below:

| Top 5 host | Sum of hits | | www.facebook.com | 200 | | www.google.com | 120 | | www.yahoo.com | 80 |
But I want to have an additional column to show the percentage of each unique host's count against the total count, i.e.:

| Top 5 host | Sum of hits | % | | www.facebook.com | 200 | 50% | | www.google.com | 120 | 30% | | www.yahoo.com | 80 | 20% |

How can I get that additional "%" column?

Thanks,
Frank

This is not currently possible :frowning:

Could you +1 this enhancement in Github? https://github.com/elastic/kibana/issues/2284

The more comments - the more likely this is to bubble to the top.

Any workaround to have smthing that looks like percentage pleaaase ?
Scripted fields may be ?

Thanks