<?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: only keep lists with multiple values? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-filter-out-the-resultToToss-based-on-the-fact-there-s/m-p/596814#M207745</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/48898"&gt;@ttovarzoll&lt;/a&gt;&amp;nbsp;- it would be &amp;gt;1&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where mvcount(SecondaryField)&amp;gt;1&lt;/LI-CODE&gt;</description>
    <pubDate>Sat, 07 May 2022 05:36:55 GMT</pubDate>
    <dc:creator>VatsalJagani</dc:creator>
    <dc:date>2022-05-07T05:36:55Z</dc:date>
    <item>
      <title>How do I filter-out the 'resultToToss' based on the fact there's only 1 'SecondaryField' result for it?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-filter-out-the-resultToToss-based-on-the-fact-there-s/m-p/596800#M207737</link>
      <description>&lt;P&gt;I am trying to create a Splunk Alert which -- well, the details will take too long to explain &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The issue is that I'm generating a &lt;STRONG&gt;stats list&lt;/STRONG&gt; where some of the results have a single value while others have multiple, e.g.&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;STRONG&gt;PrimaryField&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;STRONG&gt;SecondaryField&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;resultToKeep&lt;/TD&gt;
&lt;TD width="50%"&gt;result1&lt;BR /&gt;result2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;resultToToss&lt;/TD&gt;
&lt;TD width="50%"&gt;
&lt;P&gt;result1&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do I filter-out the 'resultToToss' based on the fact there's only 1 'SecondaryField' result for it?&lt;/P&gt;</description>
      <pubDate>Sun, 08 May 2022 04:37:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-filter-out-the-resultToToss-based-on-the-fact-there-s/m-p/596800#M207737</guid>
      <dc:creator>ttovarzoll</dc:creator>
      <dc:date>2022-05-08T04:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: only keep lists with multiple values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-filter-out-the-resultToToss-based-on-the-fact-there-s/m-p/596804#M207738</link>
      <description>&lt;P&gt;You can use &lt;FONT face="courier new,courier"&gt;mvcount&lt;/FONT&gt; in a &lt;FONT face="courier new,courier"&gt;where&lt;/FONT&gt; clause to filter out singletons.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats list...
| where mvcount(SecondaryField)=1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 May 2022 00:13:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-filter-out-the-resultToToss-based-on-the-fact-there-s/m-p/596804#M207738</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-05-07T00:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: only keep lists with multiple values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-filter-out-the-resultToToss-based-on-the-fact-there-s/m-p/596811#M207742</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/48898"&gt;@ttovarzoll&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you could add a "dc" option ro your stats command, something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;your search
| stats dc(secondaryField) AS dc_secondaryField values(secondaryField) AS secondaryField BY primaryField
| where dc_secondaryField&amp;gt;1&lt;/LI-CODE&gt;&lt;P&gt;that you can use for your filters.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Sat, 07 May 2022 05:33:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-filter-out-the-resultToToss-based-on-the-fact-there-s/m-p/596811#M207742</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-05-07T05:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: only keep lists with multiple values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-filter-out-the-resultToToss-based-on-the-fact-there-s/m-p/596814#M207745</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/48898"&gt;@ttovarzoll&lt;/a&gt;&amp;nbsp;- it would be &amp;gt;1&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where mvcount(SecondaryField)&amp;gt;1&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 07 May 2022 05:36:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-filter-out-the-resultToToss-based-on-the-fact-there-s/m-p/596814#M207745</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2022-05-07T05:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: only keep lists with multiple values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-filter-out-the-resultToToss-based-on-the-fact-there-s/m-p/597011#M207814</link>
      <description>&lt;P&gt;Giuseppe,&lt;/P&gt;&lt;P&gt;Thanks, that's a great trick! But wouldn't it lose the original values of SecondaryField?&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 18:10:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-filter-out-the-resultToToss-based-on-the-fact-there-s/m-p/597011#M207814</guid>
      <dc:creator>ttovarzoll</dc:creator>
      <dc:date>2022-05-09T18:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: only keep lists with multiple values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-filter-out-the-resultToToss-based-on-the-fact-there-s/m-p/597076#M207842</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/48898"&gt;@ttovarzoll&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;if you add (as hinted in my solution) the "values(secondaryField) AS secondaryField" option in the stats command, you don't lose it.&lt;/P&gt;&lt;P&gt;Ciao and happy splunking.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 06:09:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-filter-out-the-resultToToss-based-on-the-fact-there-s/m-p/597076#M207842</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-05-10T06:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: only keep lists with multiple values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-filter-out-the-resultToToss-based-on-the-fact-there-s/m-p/597222#M207915</link>
      <description>&lt;P&gt;oh! wow, I didn't know you could do that -- list one of the original fields &lt;STRONG&gt;twice&lt;/STRONG&gt; in the stats command &lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt; I was seeing the dc(SecondaryField) and assumed that was the only/last reference to that field.&lt;/P&gt;&lt;P&gt;You've unlocked a whole new wave of discovery for me!&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 17:05:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-filter-out-the-resultToToss-based-on-the-fact-there-s/m-p/597222#M207915</guid>
      <dc:creator>ttovarzoll</dc:creator>
      <dc:date>2022-05-10T17:05:34Z</dc:date>
    </item>
  </channel>
</rss>

