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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

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