Assume I have an index of employees, each with a sub-object representing their manager:
{
"document-id": "XYZ",
"firstName": "John",
"lastName": "Smith",
"office": "midtown",
"manager": {
"document-id": "ABC",
"firstName": "Sue",
"lastName": "Smith",
"office": "downtown"
}
}
I want a dashboard with two metrics - the number of employees, and the number of managers. Easy enough - create one Metric visualization with a simple Count of documents in the index, and another Metric visualization with a Unique Count of manager.document-id.
But now what if I want to be able to filter my dashboard by "office", to see how many employees and managers I have in each office? I can't create a simple dropdown, because one Metric needs to filter based on "office", while the other needs to filter based on "manager.office".
Is there a way to do this - to have a filter apply differently to the different visualizations in a single dashboard? Perhaps some sort of parameterized visualization?
I'm using Kibana 7.4.2.
And assume that it is not feasible to create another index of just managers. Both of these entities are actually much more complicated, with many more sub-objects, than I'm representing here, so creating even more indexes with such [duplicated] complexity seems inadvisable.
Thanks!