<?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 ignore a column using addtotals/addcoltotals in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-ignore-a-column-using-addtotals-addcoltotals/m-p/73945#M18576</link>
    <description>&lt;P&gt;I prefer eval to addtotals&lt;BR /&gt;&lt;BR /&gt;
    &lt;CODE&gt;eval total=field1 + field2 + field3&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Instead of addcoltotals, use the addtotals command with the col option&lt;BR /&gt;&lt;BR /&gt;
    &lt;CODE&gt;addtotals col=true field1 field2 field3&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;BUT, you may have a more fundamental problem. After the second line of your command, you have only 3 fields available in the pipeline: count, si, tt. If that's what you want, then okay. The chart command is also making things weird, so I used the stats command instead&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="aries" splunk tt=HL7* | 
stats count by si , tt | 
eval total = count + tt|
addcoltotals col=t total count tt|
rename si as GenKey | 
rename count as Count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 18 Feb 2012 00:01:20 GMT</pubDate>
    <dc:creator>lguinn2</dc:creator>
    <dc:date>2012-02-18T00:01:20Z</dc:date>
    <item>
      <title>how to ignore a column using addtotals/addcoltotals</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-ignore-a-column-using-addtotals-addcoltotals/m-p/73944#M18575</link>
      <description>&lt;P&gt;Here is my search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="aries" splunk tt=HL7* | 
chart count by si , tt | 
addtotals |
addcoltotals|
rename si as GenKey | 
rename count as Count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My GenKey/si is is an identifying number.  I do not want to add the identifier into my totals, nor do I want a column total of the identifer.  How do I ignore the identifier and just add the pertinent data from the table?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2012 17:54:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-ignore-a-column-using-addtotals-addcoltotals/m-p/73944#M18575</guid>
      <dc:creator>mjhamm75</dc:creator>
      <dc:date>2012-02-17T17:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: how to ignore a column using addtotals/addcoltotals</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-ignore-a-column-using-addtotals-addcoltotals/m-p/73945#M18576</link>
      <description>&lt;P&gt;I prefer eval to addtotals&lt;BR /&gt;&lt;BR /&gt;
    &lt;CODE&gt;eval total=field1 + field2 + field3&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Instead of addcoltotals, use the addtotals command with the col option&lt;BR /&gt;&lt;BR /&gt;
    &lt;CODE&gt;addtotals col=true field1 field2 field3&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;BUT, you may have a more fundamental problem. After the second line of your command, you have only 3 fields available in the pipeline: count, si, tt. If that's what you want, then okay. The chart command is also making things weird, so I used the stats command instead&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="aries" splunk tt=HL7* | 
stats count by si , tt | 
eval total = count + tt|
addcoltotals col=t total count tt|
rename si as GenKey | 
rename count as Count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 18 Feb 2012 00:01:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-ignore-a-column-using-addtotals-addcoltotals/m-p/73945#M18576</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-02-18T00:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to ignore a column using addtotals/addcoltotals</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-ignore-a-column-using-addtotals-addcoltotals/m-p/73946#M18577</link>
      <description>&lt;P&gt;|addtotals label=total labelfiled=field which you want to remove&lt;/P&gt;</description>
      <pubDate>Fri, 24 Nov 2017 09:34:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-ignore-a-column-using-addtotals-addcoltotals/m-p/73946#M18577</guid>
      <dc:creator>ManiKandanS</dc:creator>
      <dc:date>2017-11-24T09:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: how to ignore a column using addtotals/addcoltotals</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-ignore-a-column-using-addtotals-addcoltotals/m-p/521089#M146810</link>
      <description>&lt;P&gt;I was searching for a solution to the same problem all morning and finally found that I can just specify which fields I want to have in the "Total" column:&lt;/P&gt;&lt;P&gt;|stats sum(GB_in) AS "GB IN", sum(GB_out) AS "GB OUT" by category |addtotals "GB IN" "GB OUT" |sort -Total&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 15:00:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-ignore-a-column-using-addtotals-addcoltotals/m-p/521089#M146810</guid>
      <dc:creator>sjbriggs</dc:creator>
      <dc:date>2020-09-23T15:00:10Z</dc:date>
    </item>
  </channel>
</rss>

