Dashboards & Visualizations

How to change the input filter value to drill down token value?

supraja
Path Finder

Hi team,

 

i have multiselect input filter , i need to set the value of multiselect input filter value to drilldown value of pie chart

how to change the input filter value to drill down token value. Please guide on this

Labels (1)
Tags (1)
0 Karma
1 Solution

supraja
Path Finder

<form>
<fieldset submitButton="false">
<input type="multiselect" token="tok_input" searchWhenChanged="true">
<label>drilldowncheck</label>
<fieldForLabel>city</fieldForLabel>
<fieldForValue>city</fieldForValue>
<search>
<query>| makeresults count=5
| streamstats count
| eval age = case(count=1, 25, count=2, 39, count=3, 31, count=4, 20,count=5,60)
| eval city = case(count=1 OR count=3, "San Francisco", count=2 OR count=4, "Seattle",count=5,"UAE")
| stats avg(age) BY city</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<valuePrefix>"</valuePrefix>
<valueSuffix>"</valueSuffix>
<delimiter>,</delimiter>
</input>
</fieldset>
<row>
<panel>
<chart>
<title>testing</title>
<search>
<query>| makeresults count=5
| streamstats count
| eval age = case(count=1, 25, count=2, 39, count=3, 31, count=4, 20,count=5,60)
| eval city = case(count=1 OR count=3, "San Francisco", count=2 OR count=4, "Seattle",count=5,"UAE")|where city IN ($tok_input$)
| stats avg(age) BY city</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<option name="charting.chart">pie</option>
<option name="charting.drilldown">all</option>
<option name="refresh.display">progressbar</option>
<drilldown>
<set token="tok_input">$click.value$</set>
<set token="form.tok_input">$click.value$</set>
</drilldown>
</chart>
</panel>
</row>
</form>

View solution in original post

0 Karma

supraja
Path Finder

<form>
<fieldset submitButton="false">
<input type="multiselect" token="tok_input" searchWhenChanged="true">
<label>drilldowncheck</label>
<fieldForLabel>city</fieldForLabel>
<fieldForValue>city</fieldForValue>
<search>
<query>| makeresults count=5
| streamstats count
| eval age = case(count=1, 25, count=2, 39, count=3, 31, count=4, 20,count=5,60)
| eval city = case(count=1 OR count=3, "San Francisco", count=2 OR count=4, "Seattle",count=5,"UAE")
| stats avg(age) BY city</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<valuePrefix>"</valuePrefix>
<valueSuffix>"</valueSuffix>
<delimiter>,</delimiter>
</input>
</fieldset>
<row>
<panel>
<chart>
<title>testing</title>
<search>
<query>| makeresults count=5
| streamstats count
| eval age = case(count=1, 25, count=2, 39, count=3, 31, count=4, 20,count=5,60)
| eval city = case(count=1 OR count=3, "San Francisco", count=2 OR count=4, "Seattle",count=5,"UAE")|where city IN ($tok_input$)
| stats avg(age) BY city</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<option name="charting.chart">pie</option>
<option name="charting.drilldown">all</option>
<option name="refresh.display">progressbar</option>
<drilldown>
<set token="tok_input">$click.value$</set>
<set token="form.tok_input">$click.value$</set>
</drilldown>
</chart>
</panel>
</row>
</form>

0 Karma

bowesmana
SplunkTrust
SplunkTrust

Set the token name to be 

form.xxx

in your drilldown setting

where xxx is the name of your multiselect token

(you need "form." to make this work)

0 Karma
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...