<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Dependent Multiselect filter in Splunk dashboard in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-Dependent-Multiselect-filter-in-Splunk-dashboard/m-p/654332#M226096</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/258894"&gt;@itnewbie&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I'd use for the subsidiary search thre fixed values (token called "sub"):&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;All:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; index=OrgA,&lt;/LI&gt;&lt;LI&gt;OrgA:&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;index=OrgB&lt;/LI&gt;&lt;LI&gt;OrgB:&amp;nbsp; &amp;nbsp; &amp;nbsp; index=OrgA OR&amp;nbsp;index=OrgB&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Then I'd use as search for the Customers:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$sub$
| dedup name
| fields name&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Tue, 15 Aug 2023 08:07:51 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2023-08-15T08:07:51Z</dc:date>
    <item>
      <title>How to create Dependent Multiselect filter in Splunk dashboard?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-Dependent-Multiselect-filter-in-Splunk-dashboard/m-p/654326#M226095</link>
      <description>&lt;P&gt;Hi I have a dashboard with multiple filters. I have a "customer" and "subsidiary" filter. I want the "customer" filter to display corresponding companies depending on the selection of "subsidiary" filter.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My query for the "customer" filter is as follow, currently it is showing all companies&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index IN ("organization_a_company", "organization_b_company")
| dedup name
| fields name&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the "subsidiary" filter, it has a static input with&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Name - Value
============
All - *
OrgA - OrgA
OrgB - OrgB&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, since the value of "subsidiary" is different from the actual index name. I need to perform eval case to map to corresponding indexes name. I tried something dynamic in "customer" filter like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index IN ("organization_a", "organization_b")
| eval $sub$ = "OrgA" &amp;lt;- the $sub$ token should come from the "subsidiary" filter, I am just testing here
| eval filteredIndex = case($sub$ == "OrgA", "organization_a", $sub$ == "OrgB", "organization_b", 1=1, "organization_*")
| search index IN ($filteredIndex$)
| dedup name
| fields name&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;but it didn't give any results. I tried follow the &lt;A href="https://community.splunk.com/t5/Splunk-Search/How-can-I-select-the-index-to-search-dynamically/m-p/320978" target="_blank" rel="noopener"&gt;example&lt;/A&gt; here by using $$ but still no luck. And I don't think I can put the eval before the search right? but how can I make the index dynamic then. Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2023 19:49:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-Dependent-Multiselect-filter-in-Splunk-dashboard/m-p/654326#M226095</guid>
      <dc:creator>itnewbie</dc:creator>
      <dc:date>2023-08-15T19:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: Dependent Multiselect filter in Splunk dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-Dependent-Multiselect-filter-in-Splunk-dashboard/m-p/654332#M226096</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/258894"&gt;@itnewbie&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I'd use for the subsidiary search thre fixed values (token called "sub"):&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;All:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; index=OrgA,&lt;/LI&gt;&lt;LI&gt;OrgA:&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;index=OrgB&lt;/LI&gt;&lt;LI&gt;OrgB:&amp;nbsp; &amp;nbsp; &amp;nbsp; index=OrgA OR&amp;nbsp;index=OrgB&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Then I'd use as search for the Customers:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$sub$
| dedup name
| fields name&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2023 08:07:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-Dependent-Multiselect-filter-in-Splunk-dashboard/m-p/654332#M226096</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-08-15T08:07:51Z</dc:date>
    </item>
  </channel>
</rss>

