Dashboards & Visualizations

How to customize dashboard to sort location-based details?

itishree
Explorer

I'm trying to get specific details and need some help.

I have two location-based input types, one for the state, and one for the city. I want to see the following details about the city: number of station ID's, station ID, station name, name of the city, name of the state.

Labels (1)
0 Karma

thambisetty
SplunkTrust
SplunkTrust

Screen Shot 2020-08-04 at 3.22.20 PM.png

 

<form>
  <label>test</label>
  <fieldset submitButton="false">
    <input type="dropdown" token="state">
      <label>state</label>
      <search>
        <query>| makeresults 
| eval state="AndhraPradesh,Karnataka,Tamilnadu" 
| makemv state delim="," 
| mvexpand state 
| table state 
| eval city=case(state="Andhra Pradesh","Nellore,Vijayawada,Vizag",state="Karnataka","Bengaluru,Mysore",state="Tamilnadu","chennai") 
| makemv city delim="," 
| mvexpand city | dedup state | table state</query>
        <earliest>-15m</earliest>
        <latest>now</latest>
      </search>
      <fieldForLabel>state</fieldForLabel>
      <fieldForValue>state</fieldForValue>
    </input>
    <input type="dropdown" token="city">
      <label>city</label>
      <fieldForLabel>city</fieldForLabel>
      <fieldForValue>city</fieldForValue>
      <search>
        <query>| makeresults 
| eval state="AndhraPradesh,Karnataka,Tamilnadu" 
| makemv state delim="," 
| mvexpand state 
| table state 
| eval city=case(state="AndhraPradesh","Nellore,Vijayawada,Vizag",state="Karnataka","Bengaluru,Mysore",state="Tamilnadu","chennai") 
| makemv city delim="," 
| mvexpand city | search state=$state$ | dedup city | table city</query>
        <earliest>-24h@h</earliest>
        <latest>now</latest>
      </search>
    </input>
  </fieldset>
</form>

----------------------------------------------------------------------

upvote if this is what you are expecting 

————————————
If this helps, give a like below.
0 Karma

itishree
Explorer

Thanks but as per selecting city  i want to get city details 

like id of station ,state name,city name,station name i have 

so i want no. of station id is there and details of that city

0 Karma

johnnykhoueiry
Explorer

You mean after selection the city to create a another panel with the full details ?

0 Karma

thambisetty
SplunkTrust
SplunkTrust

Exactly you have to create panel to shoe city details or anything else you would like to show.

————————————
If this helps, give a like below.
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 ...