<?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 How can I use TERM() phrases that comes from an  Dashboard input field? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-use-TERM-phrases-that-comes-from-an-Dashboard-input/m-p/636261#M52163</link>
    <description>&lt;P&gt;Hi *&lt;/P&gt;
&lt;P&gt;i am trying to search via tstats and TERM() statements. How can i use TERM() phrases that comes from an&amp;nbsp; Dashboard input field?&lt;/P&gt;
&lt;P&gt;for example&lt;/P&gt;
&lt;P&gt;Input field= test1,test2&lt;/P&gt;
&lt;P&gt;Output search=&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;| tstats&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;SPAN&gt;values(PREFIX(test_content=)) as &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;test_content&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;where&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;SPAN&gt;index=testindex AND (TERM(host=test1)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt; OR &lt;SPAN&gt;TERM(host=test2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;by _time PREFIX(host=)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Mar 2023 14:28:50 GMT</pubDate>
    <dc:creator>Mockjin</dc:creator>
    <dc:date>2023-03-28T14:28:50Z</dc:date>
    <item>
      <title>How can I use TERM() phrases that comes from an  Dashboard input field?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-use-TERM-phrases-that-comes-from-an-Dashboard-input/m-p/636261#M52163</link>
      <description>&lt;P&gt;Hi *&lt;/P&gt;
&lt;P&gt;i am trying to search via tstats and TERM() statements. How can i use TERM() phrases that comes from an&amp;nbsp; Dashboard input field?&lt;/P&gt;
&lt;P&gt;for example&lt;/P&gt;
&lt;P&gt;Input field= test1,test2&lt;/P&gt;
&lt;P&gt;Output search=&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;| tstats&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;SPAN&gt;values(PREFIX(test_content=)) as &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;test_content&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;where&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;SPAN&gt;index=testindex AND (TERM(host=test1)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt; OR &lt;SPAN&gt;TERM(host=test2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;by _time PREFIX(host=)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2023 14:28:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-use-TERM-phrases-that-comes-from-an-Dashboard-input/m-p/636261#M52163</guid>
      <dc:creator>Mockjin</dc:creator>
      <dc:date>2023-03-28T14:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Dashboard with TERM() and tstats</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-use-TERM-phrases-that-comes-from-an-Dashboard-input/m-p/636269#M52165</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/232811"&gt;@Mockjin&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;assuming your field &amp;amp; value is like this&amp;nbsp;&lt;EM&gt; inputfield= "test1,test2"&amp;nbsp;&lt;/EM&gt; you can do something like this&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats values(PREFIX(test_content=)) as test_content
where index=testindex AND (TERM(host=mvindex(split(inputfield,","),0)) OR TERM(host=mvindex(split(inputfield,","),1))
by _time PREFIX(host=)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2023 09:12:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-use-TERM-phrases-that-comes-from-an-Dashboard-input/m-p/636269#M52165</guid>
      <dc:creator>Gr0und_Z3r0</dc:creator>
      <dc:date>2023-03-28T09:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Dashboard with TERM() and tstats</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-use-TERM-phrases-that-comes-from-an-Dashboard-input/m-p/636330#M52168</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/240999"&gt;@Gr0und_Z3r0&lt;/a&gt; , thank you for your quick answer. When i try your idea i get the error message "unbalanced parantheses". I changed the Example Search for understanding.&lt;/P&gt;&lt;P&gt;Direct search without inputfield in test_dashboard:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|tstats count where index=_internal AND (TERM(name=dump) OR TERM(name=exec)) by PREFIX(name=)&lt;/LI-CODE&gt;&lt;P&gt;Example search with _internal index and text field named inputfield in test_dashboard:&lt;/P&gt;&lt;P&gt;inputfield="dump,exec"&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|tstats count where index=_internal AND (TERM(name=mvindex(split($inputfield$,","),0)) OR TERM(name=mvindex(split($inputfield$,","),1))) by PREFIX(name=)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea why?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2023 14:14:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-use-TERM-phrases-that-comes-from-an-Dashboard-input/m-p/636330#M52168</guid>
      <dc:creator>Mockjin</dc:creator>
      <dc:date>2023-03-28T14:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: Dashboard with TERM() and tstats</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-use-TERM-phrases-that-comes-from-an-Dashboard-input/m-p/636503#M52177</link>
      <description>&lt;P&gt;try this way....&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count where index=_internal by PREFIX(group=) 
| rename group= as group 
| eval inputfield="thruput,queue" 
| where group=mvindex(split(inputfield,","),0) OR group=mvindex(split(inputfield,","),1) 
| table group count&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Gr0und_Z3r0_0-1680085156246.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24610i5785A17ED3BD57DE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Gr0und_Z3r0_0-1680085156246.png" alt="Gr0und_Z3r0_0-1680085156246.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 10:19:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-use-TERM-phrases-that-comes-from-an-Dashboard-input/m-p/636503#M52177</guid>
      <dc:creator>Gr0und_Z3r0</dc:creator>
      <dc:date>2023-03-29T10:19:32Z</dc:date>
    </item>
  </channel>
</rss>

