Dashboards & Visualizations

How to show or hide panel in the dashboard based on multiple dropdown tokens with as-trick

sandeepkumar53
New Member

DropdownA DropdownB DropdownC DropdownD

I have single panel and it should change the search based on the above 4 dropdowns which is using unique searches.

Ex: when I select DropdownA, dashboard panel should execute index=A

  when I select DropdownB , dashboard panel should execute index=B 
Tags (3)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @sandeepkumar53,
the easiest solution, if it's acceptable for you, it's using a Radio button in addition to the for dropdown to choose the dropdown to use.

otherwise, you should find a default value for each dropdown that you're sure that isn't present (eg "XXXXXXXXXXXXXXXXXX") in this way you'll have a search like this

(index=A field1=$D1$) OR (index=B field2=$D2$) OR (index=C field3=$D3$) OR (index=D field4=$D4$)
| stats count

So by default you'll have this situation

(index=A field1=XXXXXXXXXXXXXXXXXX) OR (index=B field2=XXXXXXXXXXXXXXXXXX) OR (index=C field3=XXXXXXXXXXXXXXXXXX) OR (index=D field4=XXXXXXXXXXXXXXXXXX)
| stats count

that hasn't any result, but when you choose a value for one dropdown you'll have results because you'll use a real value.
But in this way you could use more than one dropdown at the same time.

Ciao.
Giuseppe

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...