<?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 count events based on a user name, not the events in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-events-based-on-a-user-name-not-the-events/m-p/585569#M204024</link>
    <description>&lt;P&gt;Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats dc(username)&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 17 Feb 2022 14:09:54 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2022-02-17T14:09:54Z</dc:date>
    <item>
      <title>How to count events based on a user name, not the events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-events-based-on-a-user-name-not-the-events/m-p/585568#M204023</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm struggling with a simple search.&lt;/P&gt;&lt;P&gt;I have multiple events for the same username. I need to count the number of usernames that appeared in those events. I start with just 1 day when there should be only 1 username. But this search returns the count of 7, because it counts events, not usernames, even though I put the username field in the count command:&lt;/P&gt;&lt;P&gt;index=* policy_name=* | stats count(username)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried adding dedup before stats, but it didn't do anything. What am I missing, please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Alina&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 14:04:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-events-based-on-a-user-name-not-the-events/m-p/585568#M204023</guid>
      <dc:creator>NewGhost</dc:creator>
      <dc:date>2022-02-17T14:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to count events based on a user name, not the events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-events-based-on-a-user-name-not-the-events/m-p/585569#M204024</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats dc(username)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 17 Feb 2022 14:09:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-events-based-on-a-user-name-not-the-events/m-p/585569#M204024</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-02-17T14:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to count events based on a user name, not the events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-events-based-on-a-user-name-not-the-events/m-p/585571#M204025</link>
      <description>&lt;P&gt;That's it.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 14:19:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-events-based-on-a-user-name-not-the-events/m-p/585571#M204025</guid>
      <dc:creator>NewGhost</dc:creator>
      <dc:date>2022-02-17T14:19:39Z</dc:date>
    </item>
  </channel>
</rss>

