<?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 delete last row in a table? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-delete-last-row-in-a-table/m-p/644869#M223314</link>
    <description>&lt;P&gt;Based on the layout, I hypothesize that the count column is in ascending order. &amp;nbsp;If it is so, find the maximum then compare each row with it.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eventstats max(Count) as maxcount
| where Count &amp;lt; maxcount&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 29 May 2023 04:36:14 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2023-05-29T04:36:14Z</dc:date>
    <item>
      <title>How to delete last row in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-delete-last-row-in-a-table/m-p/644608#M223294</link>
      <description>&lt;TABLE width="317"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="182"&gt;Count&lt;/TD&gt;
&lt;TD width="135"&gt;error_manager&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;System&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2&lt;/TD&gt;
&lt;TD&gt;System&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;3&lt;/TD&gt;
&lt;TD&gt;System&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;4&lt;/TD&gt;
&lt;TD&gt;System&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;5&lt;/TD&gt;
&lt;TD&gt;System&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;6&lt;/TD&gt;
&lt;TD&gt;System&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to delete last row in a table?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 12:09:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-delete-last-row-in-a-table/m-p/644608#M223294</guid>
      <dc:creator>Kirthika</dc:creator>
      <dc:date>2023-05-25T12:09:01Z</dc:date>
    </item>
    <item>
      <title>Re: delete last row in a table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-delete-last-row-in-a-table/m-p/644616#M223295</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/254923"&gt;@Kirthika&lt;/a&gt;&amp;nbsp;, In order to remove 6 from the table we must exclude it, this could be done using either |where or |search , here's my example using search:&lt;BR /&gt;&lt;BR /&gt;| makeresults&lt;BR /&gt;``` Replicating your results ```&lt;BR /&gt;| eval Count="1,2,3,4,5,6"&lt;BR /&gt;| eval Count=split(Count,",")&lt;BR /&gt;| mvexpand Count&lt;BR /&gt;| eval error_manager = "System"&lt;BR /&gt;| table Count error_manager&lt;BR /&gt;``` excluding or "deleting" 6 ```&lt;BR /&gt;|search NOT Count = 6&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;Count&lt;/TD&gt;&lt;TD width="50%"&gt;error_manager&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;1&lt;/TD&gt;&lt;TD width="50%"&gt;System&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;2&lt;/TD&gt;&lt;TD width="50%"&gt;System&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;3&lt;/TD&gt;&lt;TD width="50%"&gt;System&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;4&lt;/TD&gt;&lt;TD width="50%"&gt;System&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;5&lt;/TD&gt;&lt;TD width="50%"&gt;System&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 10:57:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-delete-last-row-in-a-table/m-p/644616#M223295</guid>
      <dc:creator>BrodyT</dc:creator>
      <dc:date>2023-05-25T10:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: delete last row in a table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-delete-last-row-in-a-table/m-p/644617#M223296</link>
      <description>&lt;P&gt;We need to remove last row. It shouldn't be based on value.&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 10:59:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-delete-last-row-in-a-table/m-p/644617#M223296</guid>
      <dc:creator>Kirthika</dc:creator>
      <dc:date>2023-05-25T10:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: delete last row in a table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-delete-last-row-in-a-table/m-p/644619#M223297</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/254923"&gt;@Kirthika&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;This will eliminate the last result assuming your data is in descending order of Count&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
``` Replicating your results ```
| eval Count="1,2,3,4,5,6" 
| eval Count=split(Count,",") 
| mvexpand Count 
| eval error_manager = "System"
| table Count error_manager
``` excluding or "deleting" 6 ```
|eventstats
|eval LastCount = 'max(Count)'
|where 'Count'!='LastCount'
|table Count error_manager&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 11:10:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-delete-last-row-in-a-table/m-p/644619#M223297</guid>
      <dc:creator>BrodyT</dc:creator>
      <dc:date>2023-05-25T11:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: delete last row in a table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-delete-last-row-in-a-table/m-p/644623#M223298</link>
      <description>&lt;P&gt;Note the use of lowercase for the count field - if this clashes with your existing field names use alternative names e.g. streamstats count as row etc.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| streamstats count
| eventstats count as total
| where count != total
| fields - count total&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 25 May 2023 11:43:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-delete-last-row-in-a-table/m-p/644623#M223298</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-05-25T11:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete last row in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-delete-last-row-in-a-table/m-p/644869#M223314</link>
      <description>&lt;P&gt;Based on the layout, I hypothesize that the count column is in ascending order. &amp;nbsp;If it is so, find the maximum then compare each row with it.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eventstats max(Count) as maxcount
| where Count &amp;lt; maxcount&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 29 May 2023 04:36:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-delete-last-row-in-a-table/m-p/644869#M223314</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-05-29T04:36:14Z</dc:date>
    </item>
  </channel>
</rss>

