I see, but it is not straight-forward but a difficult problem with elasticsearch.
So you have to take alternatives with some compromise. There are several approaches that are quite different.
As far as I can think of, there are
-
use logstash split filter plugin to create a new index with new atomic document.
eg
{"ENV": "A", "Login": {"status": "passed"}}
{"ENV": "B", "Login": {"status": "passed"}}
{"ENV": "C", "Login": {"status": "passed"}} ...
This is the structure of documents that kibana is good at, and you can realize various visualizations relatively freely. -
create script fields of counting each 'pass' and 'fail' values in LoginListStatus and use "Bar vertical percentage" visualization of lens.
(This figure is made from documents whose pass/fail count field were typed directly, not from a script)