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!

Index This | What did the zero say to the eight?

June 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

Splunk Observability Cloud's AI Assistant in Action Series: Onboarding New Hires & ...

This is the fifth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Now Playing: Splunk Education Summer Learning Premieres

It’s premiere season, and Splunk Education is rolling out new releases you won’t want to miss. Whether you’re ...