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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...