Is it possible to filter in Kibana based on fields not rendered in a visualisation?


(Daniel Burke) #1

This is probably easier to describe using an example. If I have records like:
User
{
"username" : "xxxxxx",
"user_id" : "12345"
}

When I render a visualisation based on username I can click on one of the usernames to add a filter with it.
What I want to be able to do is add a filter with user_id instead?


#2

You can edit a filter by clicking on its right icon. Then just replace "username" with "user_id" and change the query to what you need.


(Daniel Burke) #3

Thanks - I'm looking for a way to make this a single click so non-kibana experts can click through the UI to drill down. I guess this isn't possible?


#4

You can add filters to a dashboard and save it all together (including your edit and whether a filter is deactivated).


(Matt Bargar) #5

On a dashboard, you could also add a data table visualization with a list of users and put it next to the visualization you'd like to filter. Users could click on the entries in the data table and it would filter the entire dashboard.


(Sanjiv Jivan) #6

I have a similar requirement to only display the field values as a list / table without a chart / visualization associated with it. A datatable format would be okay but datatable requires one to select a metric so the table will now have an extra count / metic column in addition to the column of the field I'd to filter on.

Is there a way to have the datatable display only one column without the metric column?

Thanks,
Sanjiv


(Sanjiv Jivan) #7

I found another thread Data table :hide column Count that confirms that the Metric column cannot be removed / hidden so I used a bit of a hack to get as close to the desired results as I could short of writing a plugin.

I added a dummy numeric field to my document that has a null value for all records and in the data table I select the Metric as Max (or Min) of this field and use a label of _ or . to make the column as close to invisible as I can. Sadly column label doesn't accept markup so   doesn't work but this is what I'll have to work with for now.

Definitely a fundamental building block viz that is missing from Kibana.


(Matt Bargar) #8

Should be a fairly easy enhancement, I'd recommend filing a request on our Github repo.


(Sanjiv Jivan) #9

Filed request : https://github.com/elastic/kibana/issues/9507

Thanks,
Sanjiv


(system) #10