<?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 do I count users that have logged in at least once a month for the last 3 months? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-users-that-have-logged-in-at-least-once-a-month/m-p/415193#M169277</link>
    <description>&lt;P&gt;That's why it is best practice to ALWAYS rename aggregate fields.  &lt;/P&gt;

&lt;P&gt;| stats dc(month)  as DCmonth values(month) by USER | where DCmonth &amp;gt; 3 &lt;/P&gt;</description>
    <pubDate>Wed, 23 May 2018 18:26:45 GMT</pubDate>
    <dc:creator>DalJeanis</dc:creator>
    <dc:date>2018-05-23T18:26:45Z</dc:date>
    <item>
      <title>How do I count users that have logged in at least once a month for the last 3 months?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-users-that-have-logged-in-at-least-once-a-month/m-p/415187#M169271</link>
      <description>&lt;P&gt;Hi everyone, &lt;/P&gt;

&lt;P&gt;I want to do a distinct count of users that have: &lt;/P&gt;

&lt;P&gt;1) Logged in at least once a month AND&lt;BR /&gt;
2) They've done this in the last 3 consecutive months. &lt;/P&gt;

&lt;P&gt;So if they logged in only during one or two of the three months, it won't count them. &lt;/P&gt;

&lt;P&gt;Thanks! &lt;/P&gt;</description>
      <pubDate>Tue, 22 May 2018 19:29:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-users-that-have-logged-in-at-least-once-a-month/m-p/415187#M169271</guid>
      <dc:creator>sharonmok</dc:creator>
      <dc:date>2018-05-22T19:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: How do I count users that have logged in at least once a month for the last 3 months?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-users-that-have-logged-in-at-least-once-a-month/m-p/415188#M169272</link>
      <description>&lt;P&gt;Provided you have month field extracted from your results&lt;/P&gt;

&lt;PRE&gt;.. | stats dc(month) as Month_Count values(month) by USER | where Month_Count  &amp;gt; 3 &lt;/PRE&gt;</description>
      <pubDate>Tue, 22 May 2018 19:54:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-users-that-have-logged-in-at-least-once-a-month/m-p/415188#M169272</guid>
      <dc:creator>pradeepkumarg</dc:creator>
      <dc:date>2018-05-22T19:54:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do I count users that have logged in at least once a month for the last 3 months?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-users-that-have-logged-in-at-least-once-a-month/m-p/415189#M169273</link>
      <description>&lt;P&gt;Thanks for your reply! I'm getting a 'dc' function is unsupported in 'where' command. &lt;/P&gt;</description>
      <pubDate>Tue, 22 May 2018 20:04:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-users-that-have-logged-in-at-least-once-a-month/m-p/415189#M169273</guid>
      <dc:creator>sharonmok</dc:creator>
      <dc:date>2018-05-22T20:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do I count users that have logged in at least once a month for the last 3 months?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-users-that-have-logged-in-at-least-once-a-month/m-p/415190#M169274</link>
      <description>&lt;P&gt;@sharonmok &lt;/P&gt;

&lt;P&gt;You need to give a alias name.&lt;BR /&gt;
Try the below query..&lt;/P&gt;

&lt;P&gt;| stats dc(Month) as Month,list(Month) as Months,values(Month) as Monthss by User&lt;BR /&gt;
| where Month&amp;gt;=3&lt;BR /&gt;
| table User Month Months Monthss &lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Shankarananth T&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2018 05:27:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-users-that-have-logged-in-at-least-once-a-month/m-p/415190#M169274</guid>
      <dc:creator>Shan</dc:creator>
      <dc:date>2018-05-23T05:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: How do I count users that have logged in at least once a month for the last 3 months?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-users-that-have-logged-in-at-least-once-a-month/m-p/415191#M169275</link>
      <description>&lt;P&gt;@sharonmok, what are the month and user fields in your query. How do you identify Login attempt? Do you need to count only successful login or failed one as well? Can this be identified based on your data?&lt;/P&gt;

&lt;P&gt;If you can add sample data and current query that you have tried, it will help us assist you better.&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2018 06:37:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-users-that-have-logged-in-at-least-once-a-month/m-p/415191#M169275</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-05-23T06:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: How do I count users that have logged in at least once a month for the last 3 months?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-users-that-have-logged-in-at-least-once-a-month/m-p/415192#M169276</link>
      <description>&lt;P&gt;This is what I had originally: &lt;/P&gt;

&lt;P&gt;| dedup user_company, date_month&lt;BR /&gt;
| stats count(user_companyname) as client_count &lt;BR /&gt;
| eval A = (client_count /100) * 100 &lt;BR /&gt;
| table A&lt;/P&gt;

&lt;P&gt;The last two lines were just to make it into a percentage out of the total number of users. Login attempt is just if they show up in the logs. No need to count the ones that didn't log in. &lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:40:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-users-that-have-logged-in-at-least-once-a-month/m-p/415192#M169276</guid>
      <dc:creator>sharonmok</dc:creator>
      <dc:date>2020-09-29T19:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do I count users that have logged in at least once a month for the last 3 months?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-users-that-have-logged-in-at-least-once-a-month/m-p/415193#M169277</link>
      <description>&lt;P&gt;That's why it is best practice to ALWAYS rename aggregate fields.  &lt;/P&gt;

&lt;P&gt;| stats dc(month)  as DCmonth values(month) by USER | where DCmonth &amp;gt; 3 &lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2018 18:26:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-users-that-have-logged-in-at-least-once-a-month/m-p/415193#M169277</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2018-05-23T18:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I count users that have logged in at least once a month for the last 3 months?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-users-that-have-logged-in-at-least-once-a-month/m-p/415194#M169278</link>
      <description>&lt;P&gt;Thank you! This did exactly what I wanted it to! &lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2018 18:54:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-users-that-have-logged-in-at-least-once-a-month/m-p/415194#M169278</guid>
      <dc:creator>sharonmok</dc:creator>
      <dc:date>2018-05-23T18:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do I count users that have logged in at least once a month for the last 3 months?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-users-that-have-logged-in-at-least-once-a-month/m-p/415195#M169279</link>
      <description>&lt;P&gt;I agree,  should always rename aggregated fields. I posted this in rush. I'll fix the answer.&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2018 22:34:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-users-that-have-logged-in-at-least-once-a-month/m-p/415195#M169279</guid>
      <dc:creator>pradeepkumarg</dc:creator>
      <dc:date>2018-05-23T22:34:26Z</dc:date>
    </item>
  </channel>
</rss>

