<?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 How to use last() and first() commands in splunk? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-last-and-first-commands-in-splunk/m-p/413822#M119253</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;index="os" sourcetype="Service"  CaseNumber=* status=*  assignment_group=* |dedup _time,CaseNumber,assignment_group |streamstats current=f last(assignment_group) as lg, last(active) as  Active,first(assigned_to) as fs,last(assigned_to) as ls by CaseNumber|lookup Team.csv test as assigned_to OUTPUT TeamName| eval is_escalated= if(assignment_group!=lg AND assignment_group="Support L1",1,NULL) |eval is_resolved=if(assignment_group="Support L1" AND status="Complete" AND (isnull(Active) OR Active="true") AND fs=ls,1,NULL)|stats count(is_escalated) AS "Escalated Cases" count(is_resolved) AS "Resolved Cases" by assigned_to,TeamName| fields - TeamName&lt;/P&gt;

&lt;P&gt;The above query  display the person wise resolved and escalated count.The persons names we are reading from Team.csv file.&lt;BR /&gt;
1)Now i want to display count of only one person resolved entire case(from first to last means first(assigned_to)=last(assigned_to).&lt;BR /&gt;
2)Now i want to display  persons who is involved in that case while resolving partcular case.&lt;BR /&gt;
 EX:Case No :1111,assigned_to: ramesh,raju,ramu.&lt;BR /&gt;
      So three members worked for this case.so this case should comes under all three.&lt;BR /&gt;
3)Two steps same for Escalated cases as well.&lt;/P&gt;

&lt;P&gt;How to do this?&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 23:29:02 GMT</pubDate>
    <dc:creator>ramesh12345</dc:creator>
    <dc:date>2020-09-29T23:29:02Z</dc:date>
    <item>
      <title>How to use last() and first() commands in splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-last-and-first-commands-in-splunk/m-p/413822#M119253</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;index="os" sourcetype="Service"  CaseNumber=* status=*  assignment_group=* |dedup _time,CaseNumber,assignment_group |streamstats current=f last(assignment_group) as lg, last(active) as  Active,first(assigned_to) as fs,last(assigned_to) as ls by CaseNumber|lookup Team.csv test as assigned_to OUTPUT TeamName| eval is_escalated= if(assignment_group!=lg AND assignment_group="Support L1",1,NULL) |eval is_resolved=if(assignment_group="Support L1" AND status="Complete" AND (isnull(Active) OR Active="true") AND fs=ls,1,NULL)|stats count(is_escalated) AS "Escalated Cases" count(is_resolved) AS "Resolved Cases" by assigned_to,TeamName| fields - TeamName&lt;/P&gt;

&lt;P&gt;The above query  display the person wise resolved and escalated count.The persons names we are reading from Team.csv file.&lt;BR /&gt;
1)Now i want to display count of only one person resolved entire case(from first to last means first(assigned_to)=last(assigned_to).&lt;BR /&gt;
2)Now i want to display  persons who is involved in that case while resolving partcular case.&lt;BR /&gt;
 EX:Case No :1111,assigned_to: ramesh,raju,ramu.&lt;BR /&gt;
      So three members worked for this case.so this case should comes under all three.&lt;BR /&gt;
3)Two steps same for Escalated cases as well.&lt;/P&gt;

&lt;P&gt;How to do this?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:29:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-last-and-first-commands-in-splunk/m-p/413822#M119253</guid>
      <dc:creator>ramesh12345</dc:creator>
      <dc:date>2020-09-29T23:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to use last() and first() commands in splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-last-and-first-commands-in-splunk/m-p/413823#M119254</link>
      <description>&lt;P&gt;You need to add &lt;CODE&gt;values(assigned_to) as all&lt;/CODE&gt; in there, too.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2019 06:51:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-last-and-first-commands-in-splunk/m-p/413823#M119254</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-03-06T06:51:58Z</dc:date>
    </item>
  </channel>
</rss>

