<?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 Contingency Total Rows in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Contingency-Total-Rows/m-p/220338#M188086</link>
    <description>&lt;P&gt;Hi I wonder whether someone may be able to help me please.&lt;/P&gt;

&lt;P&gt;Using an adapted solution from @woodcock I'm using the query below, I'm creating a table as follows:&lt;/P&gt;

&lt;P&gt;Manage List&lt;BR /&gt;
TOTAL&lt;BR /&gt;
View Payments&lt;BR /&gt;
TOTAL&lt;BR /&gt;
What Do You Think&lt;BR /&gt;
TOTAL&lt;/P&gt;

&lt;P&gt;Then column headings "1 (HS)", "2 (HS)" etc.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main auditSource=frontend auditType=ExitSurvey |replace /survey With "Manage List"| contingency tags.path detail.manageList | append   [search index=main auditSource=agent-frontend auditType=ExitSurvey |replace /survey With "View Payments" |contingency tags.path detail.viewPayments ]  |append   [search index=main auditSource=frontend auditType=ExitSurvey |replace /survey With "What Do You Think" |contingency tags.path detail.whatDoYouThink] | rename tags.path TO "Question" | fields Question, 1, 2, 3, 4, 5 | fields - TOTAL | rename 1 TO "1 (HS)", 2 TO " 2 (HS)", 3 TO "3 (HS)", 4 TO "4 (HS)", 5 TO "5 (HS)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Could someone tell me please is there a way to remove the "TOTAL" rows.&lt;/P&gt;

&lt;P&gt;Many thanks and kind regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
    <pubDate>Fri, 06 Nov 2015 08:21:59 GMT</pubDate>
    <dc:creator>IRHM73</dc:creator>
    <dc:date>2015-11-06T08:21:59Z</dc:date>
    <item>
      <title>Contingency Total Rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Contingency-Total-Rows/m-p/220338#M188086</link>
      <description>&lt;P&gt;Hi I wonder whether someone may be able to help me please.&lt;/P&gt;

&lt;P&gt;Using an adapted solution from @woodcock I'm using the query below, I'm creating a table as follows:&lt;/P&gt;

&lt;P&gt;Manage List&lt;BR /&gt;
TOTAL&lt;BR /&gt;
View Payments&lt;BR /&gt;
TOTAL&lt;BR /&gt;
What Do You Think&lt;BR /&gt;
TOTAL&lt;/P&gt;

&lt;P&gt;Then column headings "1 (HS)", "2 (HS)" etc.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main auditSource=frontend auditType=ExitSurvey |replace /survey With "Manage List"| contingency tags.path detail.manageList | append   [search index=main auditSource=agent-frontend auditType=ExitSurvey |replace /survey With "View Payments" |contingency tags.path detail.viewPayments ]  |append   [search index=main auditSource=frontend auditType=ExitSurvey |replace /survey With "What Do You Think" |contingency tags.path detail.whatDoYouThink] | rename tags.path TO "Question" | fields Question, 1, 2, 3, 4, 5 | fields - TOTAL | rename 1 TO "1 (HS)", 2 TO " 2 (HS)", 3 TO "3 (HS)", 4 TO "4 (HS)", 5 TO "5 (HS)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Could someone tell me please is there a way to remove the "TOTAL" rows.&lt;/P&gt;

&lt;P&gt;Many thanks and kind regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2015 08:21:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Contingency-Total-Rows/m-p/220338#M188086</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2015-11-06T08:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: Contingency Total Rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Contingency-Total-Rows/m-p/220339#M188087</link>
      <description>&lt;P&gt;Try | search your_fieldname_here != "TOTAL" ?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:49:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Contingency-Total-Rows/m-p/220339#M188087</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2020-09-29T07:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: Contingency Total Rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Contingency-Total-Rows/m-p/220340#M188088</link>
      <description>&lt;P&gt;Hi @sundareshr, thank you for taking the time to come back to me with this.&lt;/P&gt;

&lt;P&gt;I've tried the suggestion you kindly provided as:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main auditSource=frontend auditType=ExitSurvey != "TOTAL"
|replace /survey With "Manage List"
| contingency tags.path detail.manageList
| append [search index=main auditSource=frontend auditType=ExitSurvey  
|replace /survey With "View Payments" |contingency tags.path detail.viewPayments ]  
|append [search index=main auditSource=frontend auditType=ExitSurvey 
|replace /survey With "What Do You Think" 
|contingency tags.path detail.whatDoYouThink] 
| rename tags.path TO "Question" 
| fields Question, 1 2, 3, 4, 5 
| fields - TOTAL 
| rename 1 TO "1 (HS)", 2 TO " 2 (HS)", 3 TO "3 (HS)", 4 TO "4 (HS)", 5 TO "5 (HS)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But unfortunately when I run this, I receive a 'Parser' error.&lt;/P&gt;

&lt;P&gt;Many thanks and kind regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2015 06:44:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Contingency-Total-Rows/m-p/220340#M188088</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2015-11-09T06:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: Contingency Total Rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Contingency-Total-Rows/m-p/220341#M188089</link>
      <description>&lt;P&gt;Chris,&lt;/P&gt;

&lt;P&gt;Couple of observations&lt;/P&gt;

&lt;P&gt;1) != is a comparison operator, should be used to compare field values. In this specific instance, what you need is a boolean operator (NOT). here's some light reading on this subject &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.0/Search/Usethesearchcommand"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.0/Search/Usethesearchcommand&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;2) Since you want to filter out the TOTAL row, after the contingency commands, you will have to do you search after as well. Adding something like this, before your rename command, should work&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | search tags.path!="TOTAL" 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Nov 2015 15:42:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Contingency-Total-Rows/m-p/220341#M188089</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2015-11-09T15:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: Contingency Total Rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Contingency-Total-Rows/m-p/220342#M188090</link>
      <description>&lt;P&gt;Hi, thank you very much for coming back to me with this. It works great! If you would like to put this as an answer I can 'Accept' it.&lt;/P&gt;

&lt;P&gt;Thank you also for the link which I'll be studying today.&lt;/P&gt;

&lt;P&gt;Kind Regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 07:00:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Contingency-Total-Rows/m-p/220342#M188090</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2015-11-10T07:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: Contingency Total Rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Contingency-Total-Rows/m-p/220343#M188091</link>
      <description>&lt;P&gt;@IRHM73 I've changed it to an answer. &lt;/P&gt;

&lt;P&gt;Chris,&lt;/P&gt;

&lt;P&gt;Couple of observations&lt;/P&gt;

&lt;P&gt;1) != is a comparison operator, should be used to compare field values. In this specific instance, what you need is a boolean operator (NOT). here's some light reading on this subject &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.0/Search/Usethesearchcommand"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.0/Search/Usethesearchcommand&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;2) Since you want to filter out the TOTAL row, after the contingency commands, you will have to do you search after as well. Adding something like this, before your rename command, should work&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | search tags.path!="TOTAL" 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Nov 2015 13:53:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Contingency-Total-Rows/m-p/220343#M188091</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2015-11-10T13:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: Contingency Total Rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Contingency-Total-Rows/m-p/220344#M188092</link>
      <description>&lt;P&gt;The auto-help on contingency told me that you add "usetotals=F" as the last option will get rid of the TOTALS row.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2017 21:12:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Contingency-Total-Rows/m-p/220344#M188092</guid>
      <dc:creator>_jgpm_</dc:creator>
      <dc:date>2017-09-26T21:12:00Z</dc:date>
    </item>
  </channel>
</rss>

