Dashboard auto generate filters

what will be the best way to filter on a given attribute and translate the filter to a related secondary attribute/relationship? consider below data set, if filter on color, customer who bought red also bought blue, but customer bought orange did not buy any other color. if wrapped in a app, I can do two pass, first select all the customers that bought items have color Red, then another pass and show me distinct item colors that list of customers from the first pass bought. how can this be achieved in Kibana and visualize it?

PUT /orders
{
"mappings": {
"order": {
"properties": {
"brand": { "type": "keyword"},
"color": { "type": "keyword"},
"custid": { "type": "keyword"}
}
}
}
}

PUT /orders/order/1?refresh
{
"brand": "gucci",
"color": "red",
"custid": "1"
}
PUT /orders/order/1?refresh
{
"brand": "gap",
"color": "red",
"custid": "1"
}
PUT /orders/order/2?refresh
{
"brand": "gap",
"color": "blue",
"custid": "1"
}
PUT /orders/order/3?refresh
{
"brand": "gap",
"color": "orange",
"custid": "2"
}

Hi John,

Not sure if this would scale up to large numbers of custids or not, but here's a simple pie chart with custid as the inner pie and color as the outer pie;

But I think in your case, you're not really interested in the customer id. You really want to know that some number of customers that bought one color also bought another color.

It sounds like our Graph application might be the best thing for showing that kind of relationship. Graph is part of our X-Pack plugin and requires a Platinum license. The X-Pack trial license is good for 30 days. So you could try it and see if that's what you need. I tried to use it on your data as an example, but graph needs more data points that these 3 orders.
https://www.elastic.co/products/x-pack/graph

You're data might look a little bit like this;

You might be able to create some visualization that shows what you're looking for without graph. But at the moment I'm not sure how.

Regards,
Lee

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