<?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: dynamic filter in WHERE statement in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/dynamic-filter-in-WHERE-statement/m-p/499143#M32681</link>
    <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;where is used to compare fields and search is used to compare a field to a value. You can only evaluate one function with the where. You can do multiple with a search&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;That's not true. You can use multiple conditions in a &lt;CODE&gt;where&lt;/CODE&gt; clause. You can do &lt;CODE&gt;| where like(field,"%value%") AND field2&amp;lt;$token$ AND match(field3,"&amp;lt;regex&amp;gt;")...&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 31 Jan 2020 18:44:13 GMT</pubDate>
    <dc:creator>wmyersas</dc:creator>
    <dc:date>2020-01-31T18:44:13Z</dc:date>
    <item>
      <title>dynamic filter in WHERE statement</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/dynamic-filter-in-WHERE-statement/m-p/499137#M32675</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I would like to use a dynamic filter. I have a dropdown($pool$) which select only one value from a list. I want to add a static value "all" that take all the values in the list.&lt;/P&gt;

&lt;P&gt;Code working at this moment :&lt;BR /&gt;
 &lt;CODE&gt;index&lt;/CODE&gt; &lt;CODE&gt;source&lt;/CODE&gt; &lt;BR /&gt;
| lookup bundle_3dexp.csv bundleid OUTPUTNEW bundleCode&lt;BR /&gt;
| eval poolname=bundleCode+poolLetter &lt;BR /&gt;
| where (poolname="$pool$" AND date &amp;gt;= "$time$")&lt;BR /&gt;
| dedup login&lt;BR /&gt;
| table login&lt;/P&gt;

&lt;P&gt;How should i modify the code ?  Adding an IF statement with the WHERE ?&lt;/P&gt;

&lt;P&gt;Thanks you&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 14:06:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/dynamic-filter-in-WHERE-statement/m-p/499137#M32675</guid>
      <dc:creator>alessj</dc:creator>
      <dc:date>2020-01-30T14:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic filter in WHERE statement</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/dynamic-filter-in-WHERE-statement/m-p/499138#M32676</link>
      <description>&lt;P&gt;Have you tried changing &lt;CODE&gt;where&lt;/CODE&gt; to &lt;CODE&gt;search&lt;/CODE&gt;?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 18:38:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/dynamic-filter-in-WHERE-statement/m-p/499138#M32676</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2020-01-30T18:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic filter in WHERE statement</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/dynamic-filter-in-WHERE-statement/m-p/499139#M32677</link>
      <description>&lt;P&gt;First, as @skoelpin suggested, change from &lt;CODE&gt;where&lt;/CODE&gt; to &lt;CODE&gt;search&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Second, create a static drop-down option named "All" with a value of "*"&lt;/P&gt;

&lt;P&gt;Then when the &lt;CODE&gt;| search poolname="$pool$" date&amp;gt;="$time$"&lt;/CODE&gt; runs, if you've selected "All" for the $pool$ dropdown, it will fill-in &lt;CODE&gt;| search poolname="*" date&amp;gt;="$time$"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 20:00:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/dynamic-filter-in-WHERE-statement/m-p/499139#M32677</guid>
      <dc:creator>wmyersas</dc:creator>
      <dc:date>2020-01-30T20:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic filter in WHERE statement</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/dynamic-filter-in-WHERE-statement/m-p/499140#M32678</link>
      <description>&lt;P&gt;i wasn't aware of search function&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 09:39:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/dynamic-filter-in-WHERE-statement/m-p/499140#M32678</guid>
      <dc:creator>alessj</dc:creator>
      <dc:date>2020-01-31T09:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic filter in WHERE statement</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/dynamic-filter-in-WHERE-statement/m-p/499141#M32679</link>
      <description>&lt;P&gt;&lt;CODE&gt;where&lt;/CODE&gt; is used to compare fields and &lt;CODE&gt;search&lt;/CODE&gt; is used to compare a field to a value. You can only evaluate one function with the &lt;CODE&gt;where&lt;/CODE&gt;. You can do multiple with a &lt;CODE&gt;search&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Your token is rendered a value before getting passed to that &lt;CODE&gt;search&lt;/CODE&gt; filter so you are comparing a field to a value. &lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 14:53:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/dynamic-filter-in-WHERE-statement/m-p/499141#M32679</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2020-01-31T14:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic filter in WHERE statement</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/dynamic-filter-in-WHERE-statement/m-p/499142#M32680</link>
      <description>&lt;P&gt;Now you are =D&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 18:42:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/dynamic-filter-in-WHERE-statement/m-p/499142#M32680</guid>
      <dc:creator>wmyersas</dc:creator>
      <dc:date>2020-01-31T18:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic filter in WHERE statement</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/dynamic-filter-in-WHERE-statement/m-p/499143#M32681</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;where is used to compare fields and search is used to compare a field to a value. You can only evaluate one function with the where. You can do multiple with a search&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;That's not true. You can use multiple conditions in a &lt;CODE&gt;where&lt;/CODE&gt; clause. You can do &lt;CODE&gt;| where like(field,"%value%") AND field2&amp;lt;$token$ AND match(field3,"&amp;lt;regex&amp;gt;")...&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 18:44:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/dynamic-filter-in-WHERE-statement/m-p/499143#M32681</guid>
      <dc:creator>wmyersas</dc:creator>
      <dc:date>2020-01-31T18:44:13Z</dc:date>
    </item>
  </channel>
</rss>

