<?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 rows in a table based on a field value? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-delete-rows-in-a-table-based-on-a-field-value/m-p/315138#M58981</link>
    <description>&lt;P&gt;I think this will be helpful:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/498923/if-an-entry-exists-in-stats-remove-the-entire-line.html"&gt;https://answers.splunk.com/answers/498923/if-an-entry-exists-in-stats-remove-the-entire-line.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Apr 2018 19:04:25 GMT</pubDate>
    <dc:creator>shivamgoyal23</dc:creator>
    <dc:date>2018-04-05T19:04:25Z</dc:date>
    <item>
      <title>How to delete rows in a table based on a field value?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-delete-rows-in-a-table-based-on-a-field-value/m-p/315136#M58979</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;I have a table which displays data from a query, what I want to achieve is to delete entire rows if the value of a particular field is zero&lt;/P&gt;

&lt;P&gt;Thanks in advance&lt;/P&gt;

&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 18:53:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-delete-rows-in-a-table-based-on-a-field-value/m-p/315136#M58979</guid>
      <dc:creator>leandrot</dc:creator>
      <dc:date>2018-04-05T18:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete rows in a table based on a field value?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-delete-rows-in-a-table-based-on-a-field-value/m-p/315137#M58980</link>
      <description>&lt;P&gt;You just need to add a where clause.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| where NOT field==0
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Apr 2018 19:04:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-delete-rows-in-a-table-based-on-a-field-value/m-p/315137#M58980</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2018-04-05T19:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete rows in a table based on a field value?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-delete-rows-in-a-table-based-on-a-field-value/m-p/315138#M58981</link>
      <description>&lt;P&gt;I think this will be helpful:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/498923/if-an-entry-exists-in-stats-remove-the-entire-line.html"&gt;https://answers.splunk.com/answers/498923/if-an-entry-exists-in-stats-remove-the-entire-line.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 19:04:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-delete-rows-in-a-table-based-on-a-field-value/m-p/315138#M58981</guid>
      <dc:creator>shivamgoyal23</dc:creator>
      <dc:date>2018-04-05T19:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete rows in a table based on a field value?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-delete-rows-in-a-table-based-on-a-field-value/m-p/315139#M58982</link>
      <description>&lt;P&gt;Here is the query:&lt;/P&gt;

&lt;P&gt;index=a source=ab sourcetype=qm DESK=$desk_token$ &lt;BR /&gt;
                  |stats sum(PNR_COUNT) as "Total Tickets on Queue" sum(AGENT_COUNT) as "Total Agents on Queue" max(OLDEST_Ticket) as "Oldest Ticket on Queue (mins)" by DESK,QUEUE_CITY,QUEUE_NUMBER &lt;BR /&gt;
                  | replace "0" WITH " " IN "Total of Agents on Queue" "Oldest PNR on Queue (mins)" &lt;BR /&gt;
                  |rename QUEUE_CITY as "Queue city", QUEUE_NUMBER as "Queue Number" &lt;BR /&gt;
                  |rangemap field="Oldest PNR on Queue (mins)" low=1-22000 elevated=22001-35000 severe=35001-99999999 default=" "&lt;BR /&gt;
                  |sort "Oldest PNR on Queue (mins)" desc&lt;BR /&gt;
                  | where NOT "Total Tickets on Queue"=="0"&lt;/P&gt;

&lt;P&gt;I already tried that but was not working&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:53:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-delete-rows-in-a-table-based-on-a-field-value/m-p/315139#M58982</guid>
      <dc:creator>leandrot</dc:creator>
      <dc:date>2020-09-29T18:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete rows in a table based on a field value?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-delete-rows-in-a-table-based-on-a-field-value/m-p/315140#M58983</link>
      <description>&lt;P&gt;I think it might have to do with your field name.   I used a query of mine and when I renamed the field to a field name that required quotes the Where clause no longer worked.&lt;/P&gt;

&lt;P&gt;Can you try changing your query to this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=a source=ab sourcetype=qm DESK=$desk_token$ 
|stats sum(PNR_COUNT) as TotalTicketsonQueue sum(AGENT_COUNT) as "Total Agents on Queue" max(OLDEST_Ticket) as "Oldest Ticket on Queue (mins)" by DESK,QUEUE_CITY,QUEUE_NUMBER 
| replace "0" WITH " " IN "Total of Agents on Queue" "Oldest PNR on Queue (mins)" 
|rename QUEUE_CITY as "Queue city", QUEUE_NUMBER as "Queue Number" 
|rangemap field="Oldest PNR on Queue (mins)" low=1-22000 elevated=22001-35000 severe=35001-99999999 default=" "
|sort "Oldest PNR on Queue (mins)" desc
| where NOT TotalTicketsonQueue == "0"
| rename TotalTicketsonQueue as "Total Tickets on Queue"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Apr 2018 19:30:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-delete-rows-in-a-table-based-on-a-field-value/m-p/315140#M58983</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2018-04-05T19:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete rows in a table based on a field value?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-delete-rows-in-a-table-based-on-a-field-value/m-p/315141#M58984</link>
      <description>&lt;P&gt;Many thanks!!! It worked!!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 19:45:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-delete-rows-in-a-table-based-on-a-field-value/m-p/315141#M58984</guid>
      <dc:creator>leandrot</dc:creator>
      <dc:date>2018-04-05T19:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete rows in a table based on a field value?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-delete-rows-in-a-table-based-on-a-field-value/m-p/315142#M58985</link>
      <description>&lt;P&gt;Glad to hear it!! &lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 19:47:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-delete-rows-in-a-table-based-on-a-field-value/m-p/315142#M58985</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2018-04-05T19:47:49Z</dc:date>
    </item>
  </channel>
</rss>

