<?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 extract a value from fields when using stats()? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683589#M233409</link>
    <description>&lt;P&gt;You're not showing us the events. You're showing bits and pieces from separate events.&lt;/P&gt;</description>
    <pubDate>Mon, 08 Apr 2024 12:31:36 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2024-04-08T12:31:36Z</dc:date>
    <item>
      <title>How to extract a value from fields when using stats()?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683400#M233362</link>
      <description>&lt;P&gt;Thanks in Advance&lt;BR /&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;I need to extract limited values from fields:&lt;/P&gt;&lt;P&gt;Query :&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="mulesoft" applicationName="s-concur-api" environment=PRD priority timestamp 
| search NOT message IN ("API: START: /v1/expense/extract/ondemand/accrual*") 
| spath content.payload{} 
| mvexpand content.payload{} 
|stats values(content.SourceFileName) as SourceFileName  values(content.JobName) as JobName values(content.loggerPayload.archiveFileName) as ArchivedFileName  values(message) as message min(timestamp) AS Logon_Time, max(timestamp) AS Logoff_Time by correlationId
| rex field=message max_match=0 "Expense Extract Process started for (?&amp;lt;FileName&amp;gt;[^\n]+)" 
| rex field=message max_match=0 "API: START: /v1/expense/extract/ondemand/(?&amp;lt;OtherRegion&amp;gt;[^\/]+)\/(?&amp;lt;OnDemandFileName&amp;gt;\S+)" 
| eval OtherRegion=upper(OtherRegion) 
| eval OnDemandFileName=rtrim(OnDemandFileName,"Job") 
| eval "FileName/JobName"= coalesce(OnDemandFileName,JobName) 
| eval JobType=case(like('message',"%Concur Ondemand Started%"),"OnDemand",like('message',"%API: START: /v1/expense/extract/ondemand%"),"OnDemand",like('message',"Expense Extract Process started%"),"Scheduled") 
| eval Status=case(like('message' ,"%Concur AP/GL File/s Process Status%"),"SUCCESS", like('tracePoint',"%EXCEPTION%"),"ERROR") 
| eval Region= coalesce(Region,OtherRegion) 
| eval OracleRequestId=mvappend("RequestId:",RequestID,"ImpConReqid:",ImpConReqId) 
| eval Response= coalesce(message,error,errorMessage) 
| eval StartTime=round(strptime(Logon_Time, "%Y-%m-%dT%H:%M:%S.%QZ")) 
| eval EndTime=round(strptime(Logoff_Time, "%Y-%m-%dT%H:%M:%S.%QZ")) 
| eval ElapsedTimeInSecs=EndTime-StartTime 
| eval "Total Elapsed Time"=strftime(ElapsedTimeInSecs,"%H:%M:%S") 
| eval match=if(SourceFileDTLCount=TotalAPGLRecordsCountStaged,"Match","NotMatch") 
| rename Logon_Time as Timestamp 
| table Status JobType Response ArchivedFileName ElapsedTimeInSecs "Total Elapsed Time" correlationId 
| fields - ElapsedTimeInSecs priority match 
| where JobType!=" " 
| search Status="*"&lt;/LI-CODE&gt;&lt;P&gt;In the response field i want to show only.&lt;SPAN&gt;I dont care about the rest&lt;/SPAN&gt; :&lt;/P&gt;&lt;P&gt;PRD(SUCCESS): Concur AP/GL Extract V.3.02 - APAC ORACLE PAY AP Expense Report. Concur Batch ID: 376 Company Code: 200 Operating Unit: US_AB_OU&lt;BR /&gt;PRD(SUCCESS): Concur AP/GL Extract V.3.02 - APAC ORACLE PAY AP Expense Report. Concur Batch ID: 375 Company Code: 209 Operating Unit: US_AB_OU&lt;BR /&gt;PRD(SUCCESS): Concur AP/GL Extract V.3.02 - APAC ORACLE PAY AP Expense Report. Concur Batch ID: 374 Company Code: 210 Operating Unit: US_AB_OU&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%"&gt;Status&lt;/TD&gt;&lt;TD width="25%"&gt;Response&lt;/TD&gt;&lt;TD width="25%"&gt;ArchiveFileName&lt;/TD&gt;&lt;TD width="25%"&gt;correlationId&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%"&gt;Success&lt;/TD&gt;&lt;TD width="25%"&gt;API: START: /v1/expense/extract&lt;BR /&gt;After calling flow archive-ConcurExpenseFile-SubFlow&lt;BR /&gt;Before calling flow archive-ConcurExpenseFile-SubFlow&lt;BR /&gt;Calling s-ebs-api for AP Import process&lt;BR /&gt;Concur AP/GL File/s Process Status&lt;BR /&gt;Concur Ondemand Started&lt;BR /&gt;Expense Extract Processing Starts&lt;BR /&gt;Extract has no GL Lines to Import into Oracle&lt;BR /&gt;PRD(SUCCESS): Concur AP/GL Extract V.3.02 - APAC ORACLE PAY AP Expense Report. Concur Batch ID: 376 Company Code: 200 Operating Unit: US_AB_OU&lt;BR /&gt;PRD(SUCCESS): Concur AP/GL Extract V.3.02 - APAC ORACLE PAY AP Expense Report. Concur Batch ID: 375 Company Code: 209 Operating Unit: US_AB_OU&lt;BR /&gt;PRD(SUCCESS): Concur AP/GL Extract V.3.02 - APAC ORACLE PAY AP Expense Report. Concur Batch ID: 374 Company Code: 210 Operating Unit: US_AB_OU&lt;BR /&gt;PRD(SUCCESS): Concur AP/GL File/s Process Status - APAC&lt;BR /&gt;Records Count Validation Passed&lt;/TD&gt;&lt;TD width="25%"&gt;&lt;SPAN&gt;EMEA_concur_expenses_&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="25%"&gt;&lt;SPAN&gt;49cde170-e057-11ee-8125-de5fb5&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 05 Apr 2024 12:45:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683400#M233362</guid>
      <dc:creator>karthi2809</dc:creator>
      <dc:date>2024-04-05T12:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a value from fields when using stats()?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683404#M233363</link>
      <description>&lt;P&gt;Try filtering before the stats command&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 13:11:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683404#M233363</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-04-05T13:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a value from fields when using stats()?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683440#M233372</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp; As mentioned i filter before stats.But in the events its showing the values correctly but not showing any table values&lt;/P&gt;&lt;P&gt;Query:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="mulesoft" applicationName="s-concur-api" environment=PRD (*(SUCCESS): Concur AP/GL Extract V.3.02 - *. Concur Batch ID: * Company Code: * Operating Unit: *) OR (*(SUCCESS): Concur AP/GL Extract V.3.02 - *. Concur Batch ID: *)
| search NOT message IN ("API: START: /v1/expense/extract/ondemand/accrual*") 
| spath content.payload{} 
| mvexpand content.payload{} 
| stats values(content.SourceFileName) as SourceFileName values(content.JobName) as JobName values(content.loggerPayload.archiveFileName) as ArchivedFileName values(content.payload{}) as response values(content.Region) as Region values(content.ConcurRunId) as ConcurRunId values(content.HeaderCount) as HeaderCount values(content.SourceFileDTLCount) as SourceFileDTLCount values(content.APRecordsCountStaged) as APRecordsCountStaged values(content.GLRecordsCountStaged) as GLRecordsCountStaged values(content.TotalAPGLRecordsCountStaged) as TotalAPGLRecordsCountStaged values( content.ErrorMsg) as errorMessage values(content.errorMsg) as error values("content.payload{}.AP Import flow processing results{}.requestID") as RequestID values("content.payload{}.GL Import flow processing results{}.impConReqId") as ImpConReqId values(message) as message min(timestamp) AS Logon_Time, max(timestamp) AS Logoff_Time by correlationId &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 15:50:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683440#M233372</guid>
      <dc:creator>karthi2809</dc:creator>
      <dc:date>2024-04-05T15:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a value from fields when using stats()?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683442#M233373</link>
      <description>&lt;P&gt;Try filtering like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="mulesoft" applicationName="s-concur-api" environment=PRD "*(SUCCESS): Concur AP/GL Extract V.3.02 - *. Concur Batch ID: * Company Code: * Operating Unit: *" OR "*(SUCCESS): Concur AP/GL Extract V.3.02 - *. Concur Batch ID: *"&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 05 Apr 2024 15:56:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683442#M233373</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-04-05T15:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a value from fields when using stats()?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683448#M233374</link>
      <description>&lt;P&gt;Same result its not showing any values in the table&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 16:02:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683448#M233374</guid>
      <dc:creator>karthi2809</dc:creator>
      <dc:date>2024-04-05T16:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a value from fields when using stats()?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683449#M233375</link>
      <description>&lt;P&gt;Please can you share some sample events that we can test with - please share them in a code block&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 16:08:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683449#M233375</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-04-05T16:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a value from fields when using stats()?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683455#M233379</link>
      <description>&lt;LI-CODE lang="markup"&gt;{
  "correlationId" : "43b856a1",
  "message" : "Post - Expense Extract processing to Oracle",
  "tracePoint" : "FLOW",
  "priority" : "INFO"
}
{
  "correlationId" : "43b856a1",
  "message" : "After calling flow SubFlow",
  "tracePoint" : "FLOW",
  "priority" : "INFO"
}
{
  "correlationId" : "43b856a1",
  "message" : "PRD(SUCCESS): Concur AP/GL Extract-  Expense Report. Concur Batch ID: 450 Company Code: 725 Operating Unit: AB_OU",
  "tracePoint" : "FLOW",
  "priority" : "INFO"
}
{
  "correlationId" : "19554d60",
  "message" : "PRD(SUCCESS): Concur AP/GL Extract -  Expense Report. Concur Batch ID: 398 Company Code: 755 Operating Unit: BZ_OU",
  "tracePoint" : "FLOW",
  "priority" : "INFO",
}
{
  "correlationId" : "19554d60",
  "message" : "Concur AP/GL File/s Process Status",
  "tracePoint" : "FLOW",
  "priority" : "INFO",
}
{
  "correlationId" : "19554d60",
  "message" : "PRD(SUCCESS): Concur AP/GL Extract - Expense Report. Concur Batch ID: 398 Company Code: 725 Operating Unit: AB_OU",
  "tracePoint" : "FLOW",
  "priority" : "INFO",
}
{
  "correlationId" : "19554d60",
  "message" : "Before calling flow post-PInvoice-SubFlow",
  "tracePoint" : "FLOW",
  "priority" : "INFO",
}
{
  "correlationId" : "9a1219f2",
  "message" : "Before calling flow post-APInvoice-SubFlow",
  "tracePoint" : "FLOW",
  "priority" : "INFO",
}
{
  "correlationId" : "9a1219f2",
  "message" : "PRD(SUCCESS): Concur AP/GL Extract  - AP Expense Report. Concur Batch ID: 95",
  "tracePoint" : "FLOW",
  "priority" : "INFO",
}
{
  "correlationId" : "9a1219f2",
  "message" : "Post - Expense Extract processing to Oracle",
  "tracePoint" : "FLOW",
  "priority" : "INFO",
}
{
  "correlationId" : "9a1219f2",
  "message" : "Concur Process Status",
  "tracePoint" : "FLOW",
  "priority" : "INFO",
}
{
  "correlationId" : "9a1219f2",
  "message" : "ISG AP Response",
  "tracePoint" : "FLOW",
  "priority" : "INFO",
}
{
  "correlationId" : "9a1219f2",
  "message" : "After calling flow post-APInvoice-SubFlow",
  "tracePoint" : "FLOW",
  "priority" : "INFO",
}&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 05 Apr 2024 16:29:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683455#M233379</guid>
      <dc:creator>karthi2809</dc:creator>
      <dc:date>2024-04-05T16:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a value from fields when using stats()?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683457#M233381</link>
      <description>&lt;P&gt;Is this a single event or multiple events?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 16:39:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683457#M233381</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-04-05T16:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a value from fields when using stats()?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683459#M233382</link>
      <description>&lt;P&gt;Multiple events i sent for three correlationId&amp;nbsp;43b856a1,19554d60,9a1219f2&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 16:47:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683459#M233382</guid>
      <dc:creator>karthi2809</dc:creator>
      <dc:date>2024-04-05T16:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a value from fields when using stats()?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683472#M233384</link>
      <description>&lt;P&gt;Your initial search (as it stands) doesn't appear to be able to pick up these events. Please can you clarify your events and search&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 18:59:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683472#M233384</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-04-05T18:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a value from fields when using stats()?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683489#M233388</link>
      <description>&lt;P&gt;These events don't seem to match the fields you're using in your search.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Apr 2024 12:19:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683489#M233388</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-04-06T12:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a value from fields when using stats()?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683585#M233408</link>
      <description>&lt;P&gt;Its showing in the events&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2024 11:37:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683585#M233408</guid>
      <dc:creator>karthi2809</dc:creator>
      <dc:date>2024-04-08T11:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a value from fields when using stats()?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683589#M233409</link>
      <description>&lt;P&gt;You're not showing us the events. You're showing bits and pieces from separate events.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2024 12:31:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683589#M233409</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-04-08T12:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a value from fields when using stats()?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683622#M233418</link>
      <description>&lt;P&gt;What&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;points out is that event snippets in your illustration do not contain necessary fields used in your search. (Side lesson #1:&amp;nbsp;Screenshots do not help anything except in explaining expected and actual visualization.) &amp;nbsp;Let me demonstrate with the followi&lt;/P&gt;&lt;P&gt;First of all, none of your illustrations explains where the JSON path &lt;EM&gt;content.payload{}&lt;/EM&gt; comes from. &amp;nbsp;You subsequently put this extracted field in mvexpand. &amp;nbsp;Splunk will give you an error about nonexistent field&amp;nbsp;&lt;FONT face="courier new,courier"&gt;content.payload{}&lt;/FONT&gt;. &amp;nbsp;Until you can demonstrate that this JSON path exist somewhere in your data, your illustrated full search cannot succeed. (Side lesson #2: Complicated SPL does not help diagnosis. &amp;nbsp;Not only do they discourage others from reading and understanding your message, they also blur your own thought process. &amp;nbsp;Distill the search to the point where you can clearly illustrate a "yes"-"no" choice.)&lt;/P&gt;&lt;P&gt;Secondly, your illustrations do not produce any value for&amp;nbsp;&lt;FONT face="courier new,courier"&gt;JobType&lt;/FONT&gt;, which according to your search, comes from&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval JobType=case(like('message',"%Concur Ondemand Started%"),"OnDemand",
  like('message',"%API: START: /v1/expense/extract/ondemand%"),"OnDemand",
  like('message',"Expense Extract Process started%"),"Scheduled")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In other words, none of your illustrated JSON match any of the three conditions, therefore&amp;nbsp;&lt;FONT face="courier new,courier"&gt;| where JobType!=" "&lt;/FONT&gt; will give you no result.&lt;/P&gt;&lt;P&gt;To illustrate the above two points, let's comment out the problematic portions of the SPL and see what comes out from your data snippets:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| search NOT message IN ("API: START: /v1/expense/extract/ondemand/accrual*") 
```| spath content.payload{} 
| mvexpand content.payload{} ```
|stats values(content.SourceFileName) as SourceFileName  values(content.JobName) as JobName values(content.loggerPayload.archiveFileName) as ArchivedFileName  values(message) as message min(timestamp) AS Logon_Time, max(timestamp) AS Logoff_Time by correlationId
| rex field=message max_match=0 "Expense Extract Process started for (?&amp;lt;FileName&amp;gt;[^\n]+)" 
| rex field=message max_match=0 "API: START: /v1/expense/extract/ondemand/(?&amp;lt;OtherRegion&amp;gt;[^\/]+)\/(?&amp;lt;OnDemandFileName&amp;gt;\S+)" 
| eval OtherRegion=upper(OtherRegion) 
| eval OnDemandFileName=rtrim(OnDemandFileName,"Job") 
| eval "FileName/JobName"= coalesce(OnDemandFileName,JobName) 
| eval JobType=case(like('message',"%Concur Ondemand Started%"),"OnDemand",like('message',"%API: START: /v1/expense/extract/ondemand%"),"OnDemand",like('message',"Expense Extract Process started%"),"Scheduled") 
| eval Status=case(like('message' ,"%Concur AP/GL File/s Process Status%"),"SUCCESS", like('tracePoint',"%EXCEPTION%"),"ERROR") 
| eval Region= coalesce(Region,OtherRegion) 
| eval OracleRequestId=mvappend("RequestId:",RequestID,"ImpConReqid:",ImpConReqId) 
| eval Response= coalesce(message,error,errorMessage) 
| eval StartTime=round(strptime(Logon_Time, "%Y-%m-%dT%H:%M:%S.%QZ")) 
| eval EndTime=round(strptime(Logoff_Time, "%Y-%m-%dT%H:%M:%S.%QZ")) 
| eval ElapsedTimeInSecs=EndTime-StartTime 
| eval "Total Elapsed Time"=strftime(ElapsedTimeInSecs,"%H:%M:%S") 
| eval match=if(SourceFileDTLCount=TotalAPGLRecordsCountStaged,"Match","NotMatch") 
| rename Logon_Time as Timestamp 
| table Status JobType Response ArchivedFileName ElapsedTimeInSecs "Total Elapsed Time" correlationId 
| fields - ElapsedTimeInSecs priority match 
```| where JobType!=" "
| search Status="*"```&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Status&lt;/TD&gt;&lt;TD&gt;JobType&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;Response&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;ArchivedFileName&lt;/TD&gt;&lt;TD&gt;TotalElapsedTime&lt;/TD&gt;&lt;TD&gt;correlationId&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SUCCESS&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;Before calling flow post-PInvoice-SubFlow&lt;/DIV&gt;&lt;DIV class=""&gt;Concur AP/GL File/s Process Status&lt;/DIV&gt;&lt;DIV class=""&gt;PRD(SUCCESS): Concur AP/GL Extract - Expense Report. Concur Batch ID: 398 Company Code: 755 Operating Unit: BZ_OU&lt;/DIV&gt;&lt;DIV class=""&gt;PRD(SUCCESS): Concur AP/GL Extract - Expense Report. Concur Batch ID: 398 Company Code: 725 Operating Unit: AB_OU&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;19554d60&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;After calling flow SubFlow&lt;/DIV&gt;&lt;DIV class=""&gt;PRD(SUCCESS): Concur AP/GL Extract- Expense Report. Concur Batch ID: 450 Company Code: 725 Operating Unit: AB_OU&lt;/DIV&gt;&lt;DIV class=""&gt;Post - Expense Extract processing to Oracle&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;43b856a1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;After calling flow post-APInvoice-SubFlow&lt;/DIV&gt;&lt;DIV class=""&gt;Before calling flow post-APInvoice-SubFlow&lt;/DIV&gt;&lt;DIV class=""&gt;Concur Process Status&lt;/DIV&gt;&lt;DIV class=""&gt;ISG AP Response&lt;/DIV&gt;&lt;DIV class=""&gt;PRD(SUCCESS): Concur AP/GL Extract - AP Expense Report. Concur Batch ID: 95&lt;/DIV&gt;&lt;DIV class=""&gt;Post - Expense Extract processing to Oracle&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;9a1219f2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;As you can see, only one correlationId has non-null Status, and none of them have any field other than Response. &amp;nbsp;This is a common troubleshooting technique: reduce search complexity to reveal the parts that make a difference.&lt;/P&gt;&lt;P&gt;The following is an emulation of the data snippets you illustrated. &amp;nbsp;Play with it and compare with your real data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval data = mvappend("{
  \"correlationId\" : \"43b856a1\",
  \"message\" : \"Post - Expense Extract processing to Oracle\",
  \"tracePoint\" : \"FLOW\",
  \"priority\" : \"INFO\"
}",
"{
  \"correlationId\" : \"43b856a1\",
  \"message\" : \"After calling flow SubFlow\",
  \"tracePoint\" : \"FLOW\",
  \"priority\" : \"INFO\"
}",
"{
  \"correlationId\" : \"43b856a1\",
  \"message\" : \"PRD(SUCCESS): Concur AP/GL Extract-  Expense Report. Concur Batch ID: 450 Company Code: 725 Operating Unit: AB_OU\",
  \"tracePoint\" : \"FLOW\",
  \"priority\" : \"INFO\"
}",
"{
  \"correlationId\" : \"19554d60\",
  \"message\" : \"PRD(SUCCESS): Concur AP/GL Extract -  Expense Report. Concur Batch ID: 398 Company Code: 755 Operating Unit: BZ_OU\",
  \"tracePoint\" : \"FLOW\",
  \"priority\" : \"INFO\",
}",
"{
  \"correlationId\" : \"19554d60\",
  \"message\" : \"Concur AP/GL File/s Process Status\",
  \"tracePoint\" : \"FLOW\",
  \"priority\" : \"INFO\",
}",
"{
  \"correlationId\" : \"19554d60\",
  \"message\" : \"PRD(SUCCESS): Concur AP/GL Extract - Expense Report. Concur Batch ID: 398 Company Code: 725 Operating Unit: AB_OU\",
  \"tracePoint\" : \"FLOW\",
  \"priority\" : \"INFO\",
}",
"{
  \"correlationId\" : \"19554d60\",
  \"message\" : \"Before calling flow post-PInvoice-SubFlow\",
  \"tracePoint\" : \"FLOW\",
  \"priority\" : \"INFO\",
}",
"{
  \"correlationId\" : \"9a1219f2\",
  \"message\" : \"Before calling flow post-APInvoice-SubFlow\",
  \"tracePoint\" : \"FLOW\",
  \"priority\" : \"INFO\",
}",
"{
  \"correlationId\" : \"9a1219f2\",
  \"message\" : \"PRD(SUCCESS): Concur AP/GL Extract  - AP Expense Report. Concur Batch ID: 95\",
  \"tracePoint\" : \"FLOW\",
  \"priority\" : \"INFO\",
}",
"{
  \"correlationId\" : \"9a1219f2\",
  \"message\" : \"Post - Expense Extract processing to Oracle\",
  \"tracePoint\" : \"FLOW\",
  \"priority\" : \"INFO\",
}",
"{
  \"correlationId\" : \"9a1219f2\",
  \"message\" : \"Concur Process Status\",
  \"tracePoint\" : \"FLOW\",
  \"priority\" : \"INFO\",
}",
"{
  \"correlationId\" : \"9a1219f2\",
  \"message\" : \"ISG AP Response\",
  \"tracePoint\" : \"FLOW\",
  \"priority\" : \"INFO\",
}",
"{
  \"correlationId\" : \"9a1219f2\",
  \"message\" : \"After calling flow post-APInvoice-SubFlow\",
  \"tracePoint\" : \"FLOW\",
  \"priority\" : \"INFO\",
}")
| mvexpand data
| rename data AS _raw
| spath
``` data emulation for
index="mulesoft" applicationName="s-concur-api" environment=PRD priority timestamp 
  NOT message IN ("API: START: /v1/expense/extract/ondemand/accrual*")
```&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2024 16:49:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683622#M233418</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-04-08T16:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a value from fields when using stats()?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683631#M233423</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/205249"&gt;@karthi2809&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;On your screenshots I noticed you are using Verbose mode, and you see events on "Events" tab of search interface not in the query results that shown in "Statistics" tab.&lt;/P&gt;&lt;P&gt;I think you need to filter "Response" field values to show only success responses. You can use mvfilter function to filter Response field. I filtered Response values that starts with "PRD". You can update regex inside match to according to your need.&lt;/P&gt;&lt;P&gt;Please try adding below eval at the en of your search;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval Response=mvfilter(match(Response,"^PRD"))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2024 18:39:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683631#M233423</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2024-04-08T18:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a value from fields when using stats()?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683807#M233461</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/206061"&gt;@scelikok&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Its working&amp;nbsp;&lt;BR /&gt;I am using&amp;nbsp;&amp;nbsp;coalesce if the PRD success as success message if the error i want to show error msg instead of PRD Error message .So tried like below its not working&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| eval output=mvfilter(match(message,"^PRD"))
| eval Response= coalesce(error,errorMessage,output)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 10 Apr 2024 12:25:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-value-from-fields-when-using-stats/m-p/683807#M233461</guid>
      <dc:creator>karthi2809</dc:creator>
      <dc:date>2024-04-10T12:25:36Z</dc:date>
    </item>
  </channel>
</rss>

