<?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 Fix My Search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-Fix-My-Search/m-p/753807#M242787</link>
    <description>&lt;P&gt;So this did not work, it still giving me the log from March. Here is the creation time of the latest log compared to what its giving me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GattyBiggz_0-1759274449751.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/40451iB1029E3B7E30171B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GattyBiggz_0-1759274449751.png" alt="GattyBiggz_0-1759274449751.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GattyBiggz_1-1759274477938.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/40452i5BE64E60D1E5DBB3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GattyBiggz_1-1759274477938.png" alt="GattyBiggz_1-1759274477938.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Sep 2025 23:21:26 GMT</pubDate>
    <dc:creator>GattyBiggz</dc:creator>
    <dc:date>2025-09-30T23:21:26Z</dc:date>
    <item>
      <title>Help Fix My Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-Fix-My-Search/m-p/753800#M242782</link>
      <description>&lt;P&gt;index="*azure*" UserId="*#EXT#*" earliest=-300d@d latest=now&lt;BR /&gt;| eval activity_time = coalesce(strptime(CreationTime, "%Y-%m-%dT%H:%M:%S"), _time)&lt;BR /&gt;| stats latest(activity_time) AS last_seen BY UserId&lt;BR /&gt;| eval days_since_last_activity = round((now() - last_seen) / 86400, 0)&lt;BR /&gt;| where days_since_last_activity &amp;gt; 180&lt;BR /&gt;| eval last_seen_readable = strftime(last_seen, "%Y-%m-%d %H:%M:%S")&lt;BR /&gt;| table UserId last_seen_readable days_since_last_activity&lt;BR /&gt;| sort -days_since_last_activity&lt;BR /&gt;&lt;BR /&gt;My search is showing users as last active in March however when I dive into the logs for a specific user I can see that same user had activity in May, how can I fix this?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Sep 2025 22:04:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-Fix-My-Search/m-p/753800#M242782</guid>
      <dc:creator>GattyBiggz</dc:creator>
      <dc:date>2025-09-30T22:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: Help Fix My Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-Fix-My-Search/m-p/753801#M242783</link>
      <description>&lt;P&gt;If your user's latest activity had a CreationTime of sometime in March, then that's what your search reports, not the time of the latest event.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Sep 2025 22:33:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-Fix-My-Search/m-p/753801#M242783</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2025-09-30T22:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: Help Fix My Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-Fix-My-Search/m-p/753802#M242784</link>
      <description>&lt;P&gt;The logs in May also have a CreationTime of May. But my search seems to be showing the oldest log it can find not the latest.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Sep 2025 22:44:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-Fix-My-Search/m-p/753802#M242784</guid>
      <dc:creator>GattyBiggz</dc:creator>
      <dc:date>2025-09-30T22:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: Help Fix My Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-Fix-My-Search/m-p/753803#M242785</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats max(activity_time) AS last_seen BY UserId&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 30 Sep 2025 22:51:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-Fix-My-Search/m-p/753803#M242785</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2025-09-30T22:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: Help Fix My Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-Fix-My-Search/m-p/753804#M242786</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GattyBiggz_0-1759274547603.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/40453iECA7CF04DF1CA606/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GattyBiggz_0-1759274547603.png" alt="GattyBiggz_0-1759274547603.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is the log that is displaying in my search, but I need it to display the most recent, not the oldest.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Sep 2025 23:23:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-Fix-My-Search/m-p/753804#M242786</guid>
      <dc:creator>GattyBiggz</dc:creator>
      <dc:date>2025-09-30T23:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: Help Fix My Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-Fix-My-Search/m-p/753807#M242787</link>
      <description>&lt;P&gt;So this did not work, it still giving me the log from March. Here is the creation time of the latest log compared to what its giving me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GattyBiggz_0-1759274449751.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/40451iB1029E3B7E30171B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GattyBiggz_0-1759274449751.png" alt="GattyBiggz_0-1759274449751.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GattyBiggz_1-1759274477938.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/40452i5BE64E60D1E5DBB3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GattyBiggz_1-1759274477938.png" alt="GattyBiggz_1-1759274477938.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Sep 2025 23:21:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-Fix-My-Search/m-p/753807#M242787</guid>
      <dc:creator>GattyBiggz</dc:creator>
      <dc:date>2025-09-30T23:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: Help Fix My Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-Fix-My-Search/m-p/753809#M242788</link>
      <description>&lt;P&gt;This looks like it might be part of a JSON format event. Please share the full event in raw format in a code block using the &amp;lt;/&amp;gt; format button. Please obfuscate any sensitive data as appropriate.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2025 00:59:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-Fix-My-Search/m-p/753809#M242788</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2025-10-01T00:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: Help Fix My Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-Fix-My-Search/m-p/753810#M242789</link>
      <description>&lt;LI-CODE lang="markup"&gt;{
    "AppAccessContext": {
        "AADSessionId": "*",
        "ClientAppName": "*",
        "CorrelationId": "*",
        "UniqueTokenId": "*"
    },
    "CreationTime": "2025-05-30T21:00:55",
    "Id": "*",
    "Operation": "FileAccessed",
    "OrganizationId": "*",
    "RecordType": 6,
    "UserKey": "*",
    "UserType": 0,
    "Version": 1,
    "Workload": "SharePoint",
    "ClientIP": "*",
    "UserId": "*",
    "AuthenticationType": "OAuth",
    "BrowserName": "",
    "BrowserVersion": "",
    "CorrelationId": "*",
    "EventSource": "SharePoint",
    "GeoLocation": "*",
    "IsManagedDevice": false,
    "ItemType": "File",
    "ListId": "*",
    "ListItemUniqueId": "*",
    "Platform": "*",
    "Site": "*",
    "UserAgent": "*",
    "WebId": "*",
    "DeviceDisplayName": "*",
    "HighPriorityMediaProcessing": false,
    "ListBaseType": 1,
    "ListServerTemplate": 101,
    "SiteUrl": "*",
    "SourceRelativeUrl": "*",
    "SourceFileName": "*",
    "SourceFileExtension": "docx",
    "ApplicationDisplayName": "WebWord",
    "ObjectId": "*"
}&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 01 Oct 2025 20:51:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-Fix-My-Search/m-p/753810#M242789</guid>
      <dc:creator>GattyBiggz</dc:creator>
      <dc:date>2025-10-01T20:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help Fix My Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-Fix-My-Search/m-p/753811#M242790</link>
      <description>&lt;P&gt;It is hard to tell, but it looks like you only have one field which might be used as a timestamp. Are all you events like this? For the events which aren't being picked up as being the latest, how different are they to this format? If they are the same format, what value for _time and CreationTime are they getting?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2025 01:48:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-Fix-My-Search/m-p/753811#M242790</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2025-10-01T01:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help Fix My Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-Fix-My-Search/m-p/753812#M242791</link>
      <description>&lt;P&gt;There is a much simpler explanation - with a slight uncertainty: Your search selects only those users who last appeared more than 180 days ago. &amp;nbsp;2025-05-30 is 123 days ago as of today 2025-09-30. &amp;nbsp;So, if there is a user who was last seen on 2025-03-02 and a user who was last seen on 2025-05-30, only the former will be shown.&lt;/P&gt;&lt;P&gt;The uncertainty comes from the groupby clause&amp;nbsp; &lt;FONT face="courier new,courier"&gt;BY UserId&lt;/FONT&gt;. &amp;nbsp;Can you confirm that the user displayed in your actual result (last seen on 2025-03-02) is different from the one last seen 2025-05-30? &amp;nbsp;If they are the same user, there must be a different glitch, especially if you use max. (Maybe the format of CreationTime is not precisely &lt;SPAN&gt;"%Y-%m-%dT%H:%M:%S"?)&lt;/SPAN&gt;&amp;nbsp; None the less, that search will never catch a user that appeared on 2025-05-30 till&amp;nbsp;&lt;SPAN&gt;2025-11-26 21:00:55.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2025 06:32:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-Fix-My-Search/m-p/753812#M242791</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2025-10-01T06:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: Help Fix My Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-Fix-My-Search/m-p/753850#M242796</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/257120"&gt;@GattyBiggz&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You might need to extract the CreationTime field before the stats:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval eventTime=strptime(CreationTime, "%Y-%m-%dT%H:%M:%S")
| stats latest(eventTime) as latestTime by UserId&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":glowing_star:"&gt;🌟&lt;/span&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Did this answer help you?&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;If so, please consider:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Adding karma to show it was useful&lt;/LI&gt;&lt;LI&gt;Marking it as the solution if it resolved your issue&lt;/LI&gt;&lt;LI&gt;Commenting if you need any clarification&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Your feedback encourages the volunteers in this community to continue contributing&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2025 20:56:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-Fix-My-Search/m-p/753850#M242796</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-10-01T20:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: Help Fix My Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-Fix-My-Search/m-p/753859#M242800</link>
      <description>&lt;P&gt;This should not be necessary as the OP indicates and illustrates events as JSON objects. &amp;nbsp;Splunk automatically extracts from JSON..&lt;/P&gt;</description>
      <pubDate>Thu, 02 Oct 2025 04:52:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-Fix-My-Search/m-p/753859#M242800</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2025-10-02T04:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help Fix My Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-Fix-My-Search/m-p/753860#M242801</link>
      <description>&lt;P&gt;The general idea behind your search is relatively sound but there are some possible issues with it. Most of those doubts come from the fact that we don't know your data and how it was ingested&lt;/P&gt;&lt;P&gt;1. Don't search for "*#EXT#*" if you can avoid it. It will kill performance of your search.&lt;/P&gt;&lt;P&gt;2. The logic behind the coalesce() is not clear. It seems you have another field which is supposedly more important that the event's _time itself. But only in certain cases. That's strange.&lt;/P&gt;&lt;P&gt;3. Are you sure you wanted to use latest() with the stats command? With time-related fields you can choose from first/last, earliest/latest and min/max. There are subtle differences between them and chosing one over another can yield different, possibly wrong, results.&lt;/P&gt;&lt;P&gt;4. I'm not a big fan of rendering timestamps using eval. I'm more of a fieldformat guy.&lt;/P&gt;&lt;P&gt;5. You usually don't want the table command anywhere before the last command. (in this case it doesn't change much but it's worth remembering)&lt;/P&gt;</description>
      <pubDate>Thu, 02 Oct 2025 06:58:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-Fix-My-Search/m-p/753860#M242801</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-10-02T06:58:10Z</dc:date>
    </item>
  </channel>
</rss>

