<?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 Why am I getting where clause? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-where-clause/m-p/641182#M222142</link>
    <description>&lt;P&gt;I have a search where I am comparing two indexes for a matching cell and I am trying to filter where Business = 1X... here's the SPL:&lt;/P&gt;
&lt;P&gt;index=csmp OR index=aws-business-map&lt;BR /&gt;| eval BindleNew = case(sourcetype="sim_csmp", AWSAccountName, sourcetype="csv", BindleName)&lt;BR /&gt;| stats values(IssueUrl), values(AWSAccountName) as AWSAccountName, values(BindleName), values(Business) by BindleNew&lt;BR /&gt;| search AWSAccountName!=""&lt;/P&gt;
&lt;P&gt;I am unsure where to put Business-="1X" clause.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, if we have more indexes like csmp that I am trying to compare to aws-business-map, how do we go about matching 4 indexes to aws-business-map?&lt;/P&gt;</description>
    <pubDate>Tue, 25 Apr 2023 01:39:17 GMT</pubDate>
    <dc:creator>hantun</dc:creator>
    <dc:date>2023-04-25T01:39:17Z</dc:date>
    <item>
      <title>Why am I getting where clause?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-where-clause/m-p/641182#M222142</link>
      <description>&lt;P&gt;I have a search where I am comparing two indexes for a matching cell and I am trying to filter where Business = 1X... here's the SPL:&lt;/P&gt;
&lt;P&gt;index=csmp OR index=aws-business-map&lt;BR /&gt;| eval BindleNew = case(sourcetype="sim_csmp", AWSAccountName, sourcetype="csv", BindleName)&lt;BR /&gt;| stats values(IssueUrl), values(AWSAccountName) as AWSAccountName, values(BindleName), values(Business) by BindleNew&lt;BR /&gt;| search AWSAccountName!=""&lt;/P&gt;
&lt;P&gt;I am unsure where to put Business-="1X" clause.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, if we have more indexes like csmp that I am trying to compare to aws-business-map, how do we go about matching 4 indexes to aws-business-map?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 01:39:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-where-clause/m-p/641182#M222142</guid>
      <dc:creator>hantun</dc:creator>
      <dc:date>2023-04-25T01:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: Getting where clause</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-where-clause/m-p/641197#M222149</link>
      <description>&lt;P&gt;This should answer the question&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=csmp OR index=aws-business-map
| eval BindleNew = case(sourcetype="sim_csmp", AWSAccountName, sourcetype="csv", BindleName)
| stats values(IssueUrl), values(AWSAccountName) as AWSAccountName, values(BindleName), values(Business) as Business by BindleNew
| search AWSAccountName!="" Business-="1X"&lt;/LI-CODE&gt;&lt;P&gt;To add more indexes&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=csmp OR index=aws-business-map OR index=index3 OR index=index4
| eval BindleNew = case(sourcetype="sim_csmp", AWSAccountName, sourcetype="csv", BindleName, sourcetype="st3", foo, sourcetype="st4", bar)
| stats values(IssueUrl), values(AWSAccountName) as AWSAccountName, values(BindleName), values(Business) as Business by BindleNew
| search AWSAccountName!="" Business-="1X"&lt;/LI-CODE&gt;&lt;P&gt;I believe it will not solve the problem, however.&amp;nbsp; That's because the &lt;FONT face="courier new,courier"&gt;values&lt;/FONT&gt; function returns a multi-value field that doesn't work well with many other commands.&amp;nbsp; Multi-value fields need to be processed with mv* functions (&lt;FONT face="courier new,courier"&gt;mvindex&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;mvfind&lt;/FONT&gt;, etc).&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2023 21:48:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-where-clause/m-p/641197#M222149</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-04-24T21:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: Getting where clause</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-where-clause/m-p/641330#M222189</link>
      <description>&lt;P&gt;index=csmp OR index=aws-business-map OR index=sim OR index=guardduty&lt;BR /&gt;| eval BindleNew = case(sourcetype="sim_csmp", AWSAccountName, sourcetype="csv", BindleName, sourcetype="sim_prod", WAWT2-BindleName, sourcetype="sim_prod", CloudTrail-AWSAccountName, sourcetype="sim_gd", AWSAccountId)&lt;BR /&gt;| stats values(IssueUrl), values(AWSAccountName) as AWSAccountName, values(BindleName), values(WAWT2-BindleName), values(CloudTrail-AWSAccountName), values(AWSAccountId), values(Business) as Business by BindleNew&lt;BR /&gt;| search AWSAccountName!="" Business="XP"&lt;/P&gt;&lt;P&gt;This is what I have for combination so far. Something to note is that CloudTrail-AWSAccountName, WAWT2-BindleName, BindleName, AWSAccountName are all the same data. Can we normalize them using Match?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 18:23:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-where-clause/m-p/641330#M222189</guid>
      <dc:creator>hantun</dc:creator>
      <dc:date>2023-04-25T18:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Getting where clause</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-where-clause/m-p/641342#M222192</link>
      <description>&lt;P&gt;If those fields are all the same then there's no need for a &lt;FONT face="courier new,courier"&gt;case&lt;/FONT&gt; function.&amp;nbsp; Use the &lt;FONT face="courier new,courier"&gt;coalesce &lt;/FONT&gt;function to choose the first field that is present in the current event.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=csmp OR index=aws-business-map OR index=sim OR index=guardduty
| eval BindleNew = lower(coalesce(AWSAccountName, BindleName, WAWT2-BindleName, CloudTrail-AWSAccountName, AWSAccountId))
| stats values(IssueUrl), values(AWSAccountName) as AWSAccountName, values(BindleName), values(WAWT2-BindleName), values(CloudTrail-AWSAccountName), values(AWSAccountId), values(Business) as Business by BindleNew
| search AWSAccountName!="" Business="XP"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 20:07:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-where-clause/m-p/641342#M222192</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-04-25T20:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting where clause?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-where-clause/m-p/641350#M222198</link>
      <description>&lt;P&gt;Can we put that into a static function of a dropdown? If so, how should we go about it?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am building dashboard where we are counting the business&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 23:48:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-where-clause/m-p/641350#M222198</guid>
      <dc:creator>hantun</dc:creator>
      <dc:date>2023-04-25T23:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting where clause?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-where-clause/m-p/641585#M222256</link>
      <description>&lt;P&gt;Static values are pre-defined and cannot use search results.&amp;nbsp; It's the dynamic dropdowns that use searches.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 12:43:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-where-clause/m-p/641585#M222256</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-04-27T12:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: Getting where clause</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-where-clause/m-p/641662#M222273</link>
      <description>&lt;P&gt;How can we put that SPL query into a dynamic dropdown?&lt;/P&gt;&lt;P&gt;My project is looking for if the query spits out 1X, splunk gets all the events with the Business as 1X. If query is looking for 2X, gets all the events with Business as 2X. Then, I have dashboard panels that are doing counts etc depending on the dropdown.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 19:19:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-where-clause/m-p/641662#M222273</guid>
      <dc:creator>hantun</dc:creator>
      <dc:date>2023-04-27T19:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: Getting where clause</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-where-clause/m-p/641675#M222279</link>
      <description>&lt;P&gt;Edit the dashboard and click on the edit icon for the dropdown.&amp;nbsp; Put the query into the search box in the Dynamic Options section.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="richgalloway_0-1682629922266.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/25128i03084DE42A0D8C9B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="richgalloway_0-1682629922266.png" alt="richgalloway_0-1682629922266.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;richgalloway_0-1682629922266.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 21:12:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-where-clause/m-p/641675#M222279</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-04-27T21:12:51Z</dc:date>
    </item>
  </channel>
</rss>

