<?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: How to return a field that isn't part of the stats count? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-return-a-field-that-isn-t-part-of-the-stats-count/m-p/249653#M74510</link>
    <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.... | stats values(loginid) as lid count by sessionid | where mvcount(lid)&amp;gt;1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 13 May 2016 11:22:38 GMT</pubDate>
    <dc:creator>sundareshr</dc:creator>
    <dc:date>2016-05-13T11:22:38Z</dc:date>
    <item>
      <title>How to return a field that isn't part of the stats count?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-return-a-field-that-isn-t-part-of-the-stats-count/m-p/249652#M74509</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;I'm trying to get a table of all the Session_ID values when the count of Logon_IDs is more than 2, but since the stats count is based on the number of Logon_IDs, the Session_ID field is no longer available for me to &lt;CODE&gt;table&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;For example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Data=
Logon_IDs       Session_ID
Jones           sess_1
Smith           sess_2
Brown           sess_3
Smith           sess_4
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My first attempt was &lt;CODE&gt;stats count BY Logon_IDs" | where count &amp;gt; 1 | table Session_ID&lt;/CODE&gt;, but this removes the Session_ID field.&lt;/P&gt;

&lt;P&gt;What SPL should I be using to get the result:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Session_ID
sess_2
sess_4
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Many thanks,&lt;BR /&gt;
Mark.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:42:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-return-a-field-that-isn-t-part-of-the-stats-count/m-p/249652#M74509</guid>
      <dc:creator>markwymer</dc:creator>
      <dc:date>2020-09-29T09:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to return a field that isn't part of the stats count?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-return-a-field-that-isn-t-part-of-the-stats-count/m-p/249653#M74510</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.... | stats values(loginid) as lid count by sessionid | where mvcount(lid)&amp;gt;1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 13 May 2016 11:22:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-return-a-field-that-isn-t-part-of-the-stats-count/m-p/249653#M74510</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-05-13T11:22:38Z</dc:date>
    </item>
  </channel>
</rss>

