How to filter a different field when a value is selected in another field in Kibana?

hi,

Lets says I have the below index

PUT /testindex/
{
  "mappings": {
    "properties": {
      "field1": {
        "type": "keyword"
      },
"Data": {
        "type": "keyword"
      }
    }
  }
}

POST /testindex/_bulk?refresh
{"index":{}}
{"columnA": "A1", "sample":1 , "Data":"A2"  }
{"index":{}}
{"columnA": "A1", "sample": 2, "Data":"A1"  }
{"index":{}}
{"columnA": "A1", "sample": 3, "Data":"A1"  }
{"index":{}}
{"columnA": "A2", "sample": 4, "Data":"A2"  }
{"index":{}}
{"columnA": "A2", "sample": 5, "Data":"A2"  }
{"index":{}}
{"columnA": "A2", "sample": 6, "Data":"A1"  }

and i've created a Kibana Visualization for columnA and sample fields as below
image

If I Select A1 in columnA I want the filter to be applied on both columnA and Data field
Returning only these documents from the index resulting appropriate visualization aswell

{"columnA": "A1", "sample": 2, "Data":"A1"  }
{"columnA": "A1", "sample": 3, "Data":"A1"  }

image

I know this is achievable by two clicks first select A1 in columnA field and select A1 in Data field but I dont want to do that I want a filter to be applied on both the fields

This can be achieved with a dynamic Scripted field which changes based on selection on the Dashboard. However, I couldn't find any such option of Dynamic scripts/fields nor any other ways to achieve this.

Kindly advise how to achieve this
thank you

You can add a search directly in the top bar of the dashboard: columnA=A1 AND Data=A2.

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