Create a bar chart that shows the number of empty fields compared with the total number of records

I know I can do this using Vega, and I also am fairly confident I can solve this using scripted fields, but I'm curious if I'm doing this the wrong way and making something that should be really, really easy much harder.

I have an index with 1000 records that are all "applications". I have a bunch of different fields that are properties of the application, but for the purpose of this conversation I have "portfolios" and "contact".

At it's simplest I can take a bar chart, leave the metric on "count" and then make the X-Axis the "Portfolio" and it will show me how many applications are associated to each portfolio. For example "security = 20" "hr = 50" and so on.

What I really want to do is understand how to show the amount of "contact" fields that are missing out of the number of applications in each portfolio. I can easily add another bucket and just put in the contacts field and it stacks it nicely, but the problem is, I don't want to see the individual names of all of the contacts. In the example above the security portfolio may have 20 applications and of those 18 may be different contacts. Rather than showing 20 as the total and 18 different contacts and then 1 missing contact (with a count of 2) I really just want to know what the amount missing is in comparison to the total count.

In other words, if I have 20 applications in the security portfolio, and two of them are missing the contact field (or have an empty contact field) I just want to see a bar chart that shows 18/20 - so I can quickly see how far from "complete" it is.

@Midas helped me out on a pie chart to accomplish this, and I can use the logic in Vega to do this, but is this something that Kibana doesn't support out of the box? I am using 6.8 for what it's worth, and I cannot use "scripted fields" b/c of some limitation with our implementation.

Thanks in advance!

The records are all "applications"

This is one of those problems for which I am not sure if classic Kibana charts will offer a solution.

@Marius_Dragomir can I get your eyes on this please?

Thanks,
Bhavya

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