<?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: Help with creating an index search based on the _time value (beginner) in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508724#M142134</link>
    <description>&lt;P&gt;Yeah, I actually did this while I was waiting for your response and now I get no results whatsoever.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bassik_0-1594617590537.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/9642i024372271B5EC3C3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bassik_0-1594617590537.png" alt="Bassik_0-1594617590537.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If I remove your&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;| eval _time=strptime(timeIdentifier,"%Y-%m-%d:%H:%M:%S")
| eventstats values(eval(if(a_action=="UserAuthenticationQuery",timeIdentifier,null()))) as authTime by cs_username
| where isnotnull(mvfind(authTime,timeIdentifier))&lt;/PRE&gt;&lt;P&gt;I get results.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 13 Jul 2020 05:22:47 GMT</pubDate>
    <dc:creator>Bassik</dc:creator>
    <dc:date>2020-07-13T05:22:47Z</dc:date>
    <item>
      <title>Help with creating an index search based on the _time value (beginner)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508219#M142021</link>
      <description>&lt;P&gt;Beginner here, I'm trying to run a search on unique logins for a web-based application. The current logs, however, do not indicate the information I need to be able to count which app the user logged into.&amp;nbsp;&lt;/P&gt;&lt;P&gt;It may be easier to illustrate the search:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Annotation 2020-07-09 120311.png" style="width: 730px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/9576i3106296B646A87C7/image-dimensions/730x135?v=v2" width="730" height="135" role="button" title="Annotation 2020-07-09 120311.png" alt="Annotation 2020-07-09 120311.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;What I am trying to archive is on the _time value all those events (hidden) are triggered at the exact same time. I want to use that value as a unique ID to evaluate all the events that happened at that time as a group.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The information I require is from a_app&lt;/P&gt;&lt;P&gt;Could some explain to me a way to archive this?&lt;/P&gt;&lt;P&gt;I guess in summary if the UserAuthicationQuery had an actual log that identified what the user was logging into it would then work but the a_app for this process is done in a central location and not associated with the actual app the user is entering.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 02:05:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508219#M142021</guid>
      <dc:creator>Bassik</dc:creator>
      <dc:date>2020-07-09T02:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: Help with creating an index search based on the _time value (beginner)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508240#M142022</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/49101"&gt;@Bassik&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;As you said , it might not be accurate. However, if you want to get the app list for a user with time as a common factor (seconds' precision) , try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"your search"
|eval timeIdentifier=strftime(_time,"%Y-%m-%d-%H-%M-%S")
|stats values(a_app)  as appList by timeIdentifier,cs_username&lt;/LI-CODE&gt;&lt;P&gt;appList should have the list of apps. We converted time to string just to make sure that we take until seconds precision. You may user _time directly as well&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 06:36:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508240#M142022</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2020-07-09T06:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Help with creating an index search based on the _time value (beginner)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508420#M142062</link>
      <description>&lt;P&gt;Hi Renjith, thanks for assisting. This did help however, I still cannot collectively gather all other events that the _time variable is when associated with the UserAuthenticationQuery.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need the "timeIdentifier" to be the factor based on my search. I think there maybe a need to do a nested query here. Because now that I have "timeIdentifier", my next search would be something on the lines of:&lt;/P&gt;&lt;P&gt;Search : where _time=timeIdentifier.&lt;/P&gt;&lt;P&gt;If I described it easier to see below, this is a mock of a report whereby the "UserAuthenticationQuery" will always have App1 as the a_app however, it is not the actual app the user is logging into. The a_action below is the next identifier that holds the app the user logins into.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need all the apps associated with the "timeIdentifier" but triggered by the "UserAuthenticationQuery" _time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Annotation 2020-311.png" style="width: 681px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/9598i51731CFB41DE068C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Annotation 2020-311.png" alt="Annotation 2020-311.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 01:34:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508420#M142062</guid>
      <dc:creator>Bassik</dc:creator>
      <dc:date>2020-07-10T01:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: Help with creating an index search based on the _time value (beginner)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508482#M142074</link>
      <description>&lt;P&gt;Subsearch should work here.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this and test against your data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="test" sourcetype="apps"
    [search index="test" sourcetype="apps" a_action="UserAuthenticationQuery"| fields timeIdentifier]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;replace with your index and other search terms&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 15:27:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508482#M142074</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2020-07-10T15:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: Help with creating an index search based on the _time value (beginner)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508505#M142083</link>
      <description>&lt;P&gt;Ok, thanks again. The second approach gave me some more information but unfortunately did not get me the results needed. I got multiple times now.&lt;/P&gt;&lt;P&gt;I kind of only need all the a_app values times where the a_action="UserAuthenticationQuery" and then use that time to populate all other events (a_app, dedup cs_username)&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Annotation 2020-311.png" style="width: 681px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/9606iC9E74AA1C8B6ABF4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Annotation 2020-311.png" alt="Annotation 2020-311.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So below would be the results I would be after. Keep in mind that I would have more than just 2 events... I could have hundreds but the key here is that the sequential event would contain the correct app the user logged into, which would be App2.&lt;/P&gt;&lt;P&gt;Also note I cannot include "UserAuthenticationQuery" in my search because then it eliminates the search results needed to find that&amp;nbsp;sequential event.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Annotation 2020.png" style="width: 709px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/9607iF32791D65BDD7F6D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Annotation 2020.png" alt="Annotation 2020.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The key unique ID here is only the _time field. Thus I need this to pull all the events that happen at that exact time. I am basing my assumption that when a user logs in this is all done within milliseconds.&lt;/P&gt;&lt;P&gt;The results I got from your second approach was:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Annotation list.png" style="width: 951px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/9608i2DD816E4F6F5931B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Annotation list.png" alt="Annotation list.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And you first approach I got nothing...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I was assuming that we are still keeping your original suggestions to the search right?&lt;/P&gt;&lt;P&gt;(eval timeIdentifier=strftime(_time,"%Y-%m-%d:%H:%M:%S") |stats values(a_app) as appList by timeIdentifier,cs_username )&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 15:34:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508505#M142083</guid>
      <dc:creator>Bassik</dc:creator>
      <dc:date>2020-07-10T15:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: Help with creating an index search based on the _time value (beginner)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508511#M142086</link>
      <description>&lt;P class="lia-align-left"&gt;So just a thought, to make it understandable. I could do a search like this:&lt;/P&gt;&lt;P class="lia-align-left"&gt;index=iis_prod sourcetype=iis site=AWS&amp;nbsp; a_action=UserAuthenticationQuery | eval timeIdentifier=strftime(_time,"%Y-%m-%d:%H:%M:%S") |stats values(a_app) as appList by timeIdentifier,cs_username&lt;/P&gt;&lt;P class="lia-align-left"&gt;And I'd get these results (mock)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bassik_2-1594395843338.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/9611iEC0A688339148531/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bassik_2-1594395843338.png" alt="Bassik_2-1594395843338.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But the actual fact is that I don't want App1 because I know that that isn't the app the user logged into. App1 one is gateway to the forwarding app. But because I can capture that time the user logged into App1, I know that if I could find all associated events at that&amp;nbsp;UserAuthenticationQuery time I could identify the app.&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P class="lia-align-left"&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 15:47:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508511#M142086</guid>
      <dc:creator>Bassik</dc:creator>
      <dc:date>2020-07-10T15:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: Help with creating an index search based on the _time value (beginner)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508577#M142101</link>
      <description>&lt;P&gt;Do you have the App1 and the forwarding apps in the same index?&lt;/P&gt;&lt;P&gt;Below should pick up the _time from the events which matches action=UserAuthenticationQuery and apply that to the outer search.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=iis_prod sourcetype=iis site=AWS  
[search index=iis_prod sourcetype=iis site=AWS a_action=UserAuthenticationQuery|fields _time]&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;second approach will not work if you have multiple UserAuthenticationQuery events. Let me know if you see any events for the above search&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jul 2020 04:45:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508577#M142101</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2020-07-11T04:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Help with creating an index search based on the _time value (beginner)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508582#M142102</link>
      <description>&lt;P&gt;Yes, all the apps are in the same IIS index but not on the UserAuthenticationQuery event.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get an error on that search and nothing if i remove the pipe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bassik_0-1594445570724.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/9617iA8FF4CC42C96F88E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bassik_0-1594445570724.png" alt="Bassik_0-1594445570724.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jul 2020 05:34:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508582#M142102</guid>
      <dc:creator>Bassik</dc:creator>
      <dc:date>2020-07-11T05:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: Help with creating an index search based on the _time value (beginner)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508602#M142103</link>
      <description>&lt;P&gt;you dont need a pipe before second search.&lt;/P&gt;&lt;P&gt;Subsearch creates the list of items in the subsearch as OR'ed condition and apply to the main search.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jul 2020 11:49:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508602#M142103</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2020-07-11T11:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: Help with creating an index search based on the _time value (beginner)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508604#M142104</link>
      <description>&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;Thanks but as I said removing the pipe I get no results&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jul 2020 12:14:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508604#M142104</guid>
      <dc:creator>Bassik</dc:creator>
      <dc:date>2020-07-11T12:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help with creating an index search based on the _time value (beginner)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508684#M142121</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/49101"&gt;@Bassik&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Just to be on the same page, here is a sample data created and the respective search. Please try this and let me know where is the issue&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Main Data Set (8 records)&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|makeresults|eval a_app="App1 App2 App2 App2 App1 App3 App3 App3"|makemv a_app|mvexpand a_app
|appendcols [|makeresults|eval a_action="UserAuthenticationQuery action1 action2 action3 UserAuthenticationQuery action1 action2 action3"|makemv a_action|mvexpand a_action]
|appendcols [|makeresults|eval timeIdentifier="2020-06-22:15:22:24 2020-06-22:15:22:24 2020-06-22:15:22:25 2020-06-22:15:22:26 2020-06-22:16:12:22 2020-06-22:16:12:22 2020-06-22:16:12:25 2020-06-22:16:12:26"|makemv timeIdentifier|mvexpand timeIdentifier ]
|appendcols [|makeresults|eval cs_username="111111 111111 111111 111111 222222 222222 222222 222222" | makemv cs_username|mvexpand cs_username]
| eval _time=strptime(timeIdentifier,"%Y-%m-%d:%H:%M:%S")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Inner Data Set with action=UserAuthenticationQuery (2 records)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[|makeresults|eval a_app="App1 App2 App2 App2 App1 App3 App3 App3"|makemv a_app|mvexpand a_app
|appendcols [|makeresults|eval a_action="UserAuthenticationQuery action1 action2 action3 UserAuthenticationQuery action1 action2 action3"|makemv a_action|mvexpand a_action]
|appendcols [|makeresults|eval timeIdentifier="2020-06-22:15:22:24 2020-06-22:15:22:24 2020-06-22:15:22:25 2020-06-22:15:22:26 2020-06-22:16:12:22 2020-06-22:16:12:22 2020-06-22:16:12:25 2020-06-22:16:12:26"|makemv timeIdentifier|mvexpand timeIdentifier ]
|appendcols [|makeresults|eval cs_username="111111 111111 111111 111111 222222 222222 222222 222222" | makemv cs_username|mvexpand cs_username]
| eval _time=strptime(timeIdentifier,"%Y-%m-%d:%H:%M:%S")
| where a_action="UserAuthenticationQuery"
    | fields timeIdentifier ]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Combined search to find all events from the main data set where the timeIdentifier same as the timeIdentifiers of&amp;nbsp;UserAuthenticationQuery (4 records)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|makeresults|eval a_app="App1 App2 App2 App2 App1 App3 App3 App3"|makemv a_app|mvexpand a_app
|appendcols [|makeresults|eval a_action="UserAuthenticationQuery action1 action2 action3 UserAuthenticationQuery action1 action2 action3"|makemv a_action|mvexpand a_action]
|appendcols [|makeresults|eval timeIdentifier="2020-06-22:15:22:24 2020-06-22:15:22:24 2020-06-22:15:22:25 2020-06-22:15:22:26 2020-06-22:16:12:22 2020-06-22:16:12:22 2020-06-22:16:12:25 2020-06-22:16:12:26"|makemv timeIdentifier|mvexpand timeIdentifier ]
|appendcols [|makeresults|eval cs_username="111111 111111 111111 111111 222222 222222 222222 222222" | makemv cs_username|mvexpand cs_username]
| eval _time=strptime(timeIdentifier,"%Y-%m-%d:%H:%M:%S")
| search 
    [|makeresults|eval a_app="App1 App2 App2 App2 App1 App3 App3 App3"|makemv a_app|mvexpand a_app
|appendcols [|makeresults|eval a_action="UserAuthenticationQuery action1 action2 action3 UserAuthenticationQuery action1 action2 action3"|makemv a_action|mvexpand a_action]
|appendcols [|makeresults|eval timeIdentifier="2020-06-22:15:22:24 2020-06-22:15:22:24 2020-06-22:15:22:25 2020-06-22:15:22:26 2020-06-22:16:12:22 2020-06-22:16:12:22 2020-06-22:16:12:25 2020-06-22:16:12:26"|makemv timeIdentifier|mvexpand timeIdentifier ]
|appendcols [|makeresults|eval cs_username="111111 111111 111111 111111 222222 222222 222222 222222" | makemv cs_username|mvexpand cs_username]
| eval _time=strptime(timeIdentifier,"%Y-%m-%d:%H:%M:%S")
| where a_action="UserAuthenticationQuery"
    | fields timeIdentifier ]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this is what you expect, you can apply the same in your dataset regardless it's same index or different index&lt;/P&gt;&lt;P&gt;Another approach combining both in a single search&amp;nbsp; (added an extra event for multiple values of UserAuth&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|makeresults|eval a_app="App1 App2 App2 App2 App1 App1 App3 App3 App3"|makemv a_app|mvexpand a_app
|appendcols [|makeresults|eval a_action="UserAuthenticationQuery action1 action2 action3 UserAuthenticationQuery UserAuthenticationQuery action1 action2 action3"|makemv a_action|mvexpand a_action]
|appendcols [|makeresults|eval timeIdentifier="2020-06-22:15:22:24 2020-06-22:15:22:24 2020-06-22:15:22:25 2020-06-22:15:22:26 2020-06-22:15:22:26 2020-06-22:16:12:22 2020-06-22:16:12:22 2020-06-22:16:12:25 2020-06-22:16:12:26"|makemv timeIdentifier|mvexpand timeIdentifier ]
|appendcols [|makeresults|eval cs_username="111111 111111 111111 111111 111111 222222 222222 222222 222222" | makemv cs_username|mvexpand cs_username]
| eval _time=strptime(timeIdentifier,"%Y-%m-%d:%H:%M:%S")
| eventstats values(eval(if(a_action=="UserAuthenticationQuery",timeIdentifier,null()))) as authTime by cs_username
| where isnotnull(mvfind(authTime,timeIdentifier))&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 12 Jul 2020 11:56:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508684#M142121</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2020-07-12T11:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: Help with creating an index search based on the _time value (beginner)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508711#M142130</link>
      <description>&lt;P&gt;Ok sweet, this one gives me (sample) results that I would like. From that, I would like to be able to list stats on these results. But this is great. Thanks.&lt;/P&gt;&lt;P&gt;How can I apply this to the actual data set without the |makeresults|?&lt;/P&gt;&lt;P&gt;Obviously there will be a numerous amount of usernames so I assume I'll be removing most of the |makeresults| with my own index. I just don't know what to include?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bassik_0-1594602341975.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/9639i09F60E756606B42F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bassik_0-1594602341975.png" alt="Bassik_0-1594602341975.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 01:36:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508711#M142130</guid>
      <dc:creator>Bassik</dc:creator>
      <dc:date>2020-07-13T01:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Help with creating an index search based on the _time value (beginner)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508720#M142133</link>
      <description>&lt;P&gt;You should replace the main data set (until the |search) with your actual events and the second data set with (after |search [ this one]] with the events for UserAuthenticationQuery&lt;/P&gt;&lt;P&gt;for e.g&lt;/P&gt;&lt;P&gt;If app details and the UserAuthentication are in different index&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="your index which app details" "other search terms with app details"|eval timeIdentifier=strftime(_time,"%Y-%m-%d:%H:%M:%S")
|search [index=iis_prod sourcetype=iis site=AWS  a_action=UserAuthenticationQuery | eval timeIdentifier=strftime(_time,"%Y-%m-%d:%H:%M:%S")|fields timeIdentifier ]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have everything in the same index&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=iis_prod sourcetype=iis site=AWS
| eval _time=strptime(timeIdentifier,"%Y-%m-%d:%H:%M:%S")
| eventstats values(eval(if(a_action=="UserAuthenticationQuery",timeIdentifier,null()))) as authTime by cs_username
| where isnotnull(mvfind(authTime,timeIdentifier))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 05:09:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508720#M142133</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2020-07-13T05:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Help with creating an index search based on the _time value (beginner)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508724#M142134</link>
      <description>&lt;P&gt;Yeah, I actually did this while I was waiting for your response and now I get no results whatsoever.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bassik_0-1594617590537.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/9642i024372271B5EC3C3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bassik_0-1594617590537.png" alt="Bassik_0-1594617590537.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If I remove your&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;| eval _time=strptime(timeIdentifier,"%Y-%m-%d:%H:%M:%S")
| eventstats values(eval(if(a_action=="UserAuthenticationQuery",timeIdentifier,null()))) as authTime by cs_username
| where isnotnull(mvfind(authTime,timeIdentifier))&lt;/PRE&gt;&lt;P&gt;I get results.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 05:22:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508724#M142134</guid>
      <dc:creator>Bassik</dc:creator>
      <dc:date>2020-07-13T05:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: Help with creating an index search based on the _time value (beginner)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508729#M142135</link>
      <description>&lt;P&gt;That's because you don't have any matching records for the "where" condition&lt;/P&gt;&lt;P&gt;Try removing "where" condition and execute the search.&lt;/P&gt;&lt;P&gt;Check if you have a matching entry of timeIdentifier in authTime (multi value). If authTime is empty, there are no events which satisfies the condition a_action="UserAuthenticationQuery"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 05:32:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508729#M142135</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2020-07-13T05:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: Help with creating an index search based on the _time value (beginner)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508733#M142136</link>
      <description>&lt;P&gt;Ok, now I get results however not in a table format as like how you sampled. I get 2,994 events.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do not see how :&lt;/P&gt;&lt;P&gt;| where isnotnull(mvfind(authTime,timeIdentifier)) would produce no results. There should not be any NULL values in that field.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 06:10:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508733#M142136</guid>
      <dc:creator>Bassik</dc:creator>
      <dc:date>2020-07-13T06:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help with creating an index search based on the _time value (beginner)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508935#M142192</link>
      <description>&lt;P&gt;Hi, so this is the closest I can get but I know that this is not what I want in its entirety. If I apply the search for&amp;nbsp;a_action="UserAuthenticationQuery" then I only get the app that is via the authorisation&amp;nbsp;gateway app (which is not the correct app). If I can somehow append the additional a_app event that follows the&amp;nbsp;UserAuthenticationQuery event.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bassik_0-1594679397052.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/9671i268E9C3518D74BE5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bassik_0-1594679397052.png" alt="Bassik_0-1594679397052.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So essentially I know for a fact that in the time frame I have specified there is a total of 13 users that have logged in because the&amp;nbsp;UserAuthenticationQuery event is an identifier.&lt;/P&gt;&lt;P&gt;This is another example of how I would like it (see below) you can see that under appList there are multiple a_apps listed. Take user &lt;STRONG&gt;00000045&lt;/STRONG&gt;. At that time of &lt;SPAN&gt;&lt;STRONG&gt;2020-06-22:15:22:24&lt;/STRONG&gt;&amp;nbsp;we can see that the user logged in and the following event also has the same time. This event holds the actual app the user logged into. H&lt;/SPAN&gt;owever, this is picking up every other event which has an app in the a_app field and not limiting the results to only the&amp;nbsp;UserAuthenticationQuery and following event. These results give me 2,730. I only want 13 users.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bassik_1-1594679424554.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/9672iCBE6BF9623A1EED9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bassik_1-1594679424554.png" alt="Bassik_1-1594679424554.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I don't know if I'm making it confusing. I do apologise as it makes sense in my head what I want but cannot provide the context or syntax to construct it.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 22:33:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508935#M142192</guid>
      <dc:creator>Bassik</dc:creator>
      <dc:date>2020-07-13T22:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: Help with creating an index search based on the _time value (beginner)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508959#M142199</link>
      <description>&lt;P&gt;No problem, if you are looking only for the next action and not all of them, replace eventstats part with the below and try&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eventstats values(eval(if(a_action=="UserAuthenticationQuery",timeIdentifier,null()))) as authTime by cs_username|streamstats count reset_on_change=true by cs_username,timeIdentifier
| where isnotnull(mvfind(authTime,timeIdentifier)) AND count &amp;lt; 3&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 14 Jul 2020 02:50:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508959#M142199</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2020-07-14T02:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: Help with creating an index search based on the _time value (beginner)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508964#M142201</link>
      <description>&lt;P&gt;ok thanks however I get nothing when I put:&lt;/P&gt;&lt;P&gt;| where isnotnull(mvfind(authTime,timeIdentifier)) AND count &amp;lt; 3&lt;/P&gt;&lt;P&gt;And if I remove this I get the same 2,730 results again&lt;/P&gt;&lt;P&gt;May I ask what exactly this is requesting?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is it where "is not nothing in fields&amp;nbsp;authTime,timeIdentifier?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 03:14:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508964#M142201</guid>
      <dc:creator>Bassik</dc:creator>
      <dc:date>2020-07-14T03:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: Help with creating an index search based on the _time value (beginner)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508965#M142202</link>
      <description>&lt;P&gt;This is based on the assumption that UserAuthenticationQuery and other events are in same index.&lt;/P&gt;&lt;P&gt;By using&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eventstats values(eval(if(a_action=="UserAuthenticationQuery",timeIdentifier,null()))) as authTime by cs_username&lt;/LI-CODE&gt;&lt;P&gt;We get a new Field authTime which is equal to the timestamp of UserAuthenticationQuery&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|streamstats count reset_on_change=true by cs_username,timeIdentifier&lt;/LI-CODE&gt;&lt;P&gt;will count the events in the order&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where isnotnull(mvfind(authTime,timeIdentifier)) AND count &amp;lt; 3&lt;/LI-CODE&gt;&lt;P&gt;will filter those events which have authTime (timestamp of UserAuthenticationQuery) equal to their timestap and count &amp;lt; 3 will only include the UserAuthenticationQuery and only one next event.&lt;/P&gt;&lt;P&gt;If this does not work for you, can you change the initial dummy dataset I provided (with makeresults) and make them similar to your actual events and then also give the expected output from them?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|makeresults|eval a_app="App1 App2 App2 App2 App1 App3 App3 App3"|makemv a_app|mvexpand a_app
|appendcols [|makeresults|eval a_action="UserAuthenticationQuery action1 action2 action3 UserAuthenticationQuery action1 action2 action3"|makemv a_action|mvexpand a_action]
|appendcols [|makeresults|eval timeIdentifier="2020-06-22:15:22:24 2020-06-22:15:22:24 2020-06-22:15:22:25 2020-06-22:15:22:26 2020-06-22:16:12:22 2020-06-22:16:12:22 2020-06-22:16:12:25 2020-06-22:16:12:26"|makemv timeIdentifier|mvexpand timeIdentifier ]
|appendcols [|makeresults|eval cs_username="111111 111111 111111 111111 222222 222222 222222 222222" | makemv cs_username|mvexpand cs_username]
| eval _time=strptime(timeIdentifier,"%Y-%m-%d:%H:%M:%S")&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 14 Jul 2020 03:17:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-creating-an-index-search-based-on-the-time-value/m-p/508965#M142202</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2020-07-14T03:17:29Z</dc:date>
    </item>
  </channel>
</rss>

