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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...