<?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: AddColTotal value in a new column in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/AddColTotal-value-in-a-new-column/m-p/370967#M164055</link>
    <description>&lt;P&gt;I'm trying this now.&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jan 2018 07:48:41 GMT</pubDate>
    <dc:creator>zacksoft</dc:creator>
    <dc:date>2018-01-04T07:48:41Z</dc:date>
    <item>
      <title>AddColTotal value in a new column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/AddColTotal-value-in-a-new-column/m-p/370960#M164048</link>
      <description>&lt;P&gt;I use addcoltotal for one of my columns .&lt;BR /&gt;
But my result has a lot of rows, so I have to browse a lot of pages to find my sum result at the bottom.&lt;BR /&gt;
Can we have the sum/result in a new column instead ?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 13:06:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/AddColTotal-value-in-a-new-column/m-p/370960#M164048</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-01-03T13:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: AddColTotal value in a new column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/AddColTotal-value-in-a-new-column/m-p/370961#M164049</link>
      <description>&lt;P&gt;you can try &lt;BR /&gt;
&lt;CODE&gt;  | addtotals col=t row=f&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Let me know if that helps you.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 13:11:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/AddColTotal-value-in-a-new-column/m-p/370961#M164049</guid>
      <dc:creator>risgupta</dc:creator>
      <dc:date>2018-01-03T13:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: AddColTotal value in a new column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/AddColTotal-value-in-a-new-column/m-p/370962#M164050</link>
      <description>&lt;P&gt;I have 5 columns.&lt;BR /&gt;
I need to calculate the total of the third column only.&lt;BR /&gt;
And instead of seeing the total of it at the bottom of the result, I want to see it , say on the first row of a newly created sixth column called Sum_calculated.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 13:14:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/AddColTotal-value-in-a-new-column/m-p/370962#M164050</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-01-03T13:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: AddColTotal value in a new column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/AddColTotal-value-in-a-new-column/m-p/370963#M164051</link>
      <description>&lt;P&gt;I have 5 columns.&lt;BR /&gt;
I need to calculate the total of the third column only.&lt;BR /&gt;
And instead of seeing the total of it at the bottom of the result, I want to see it , say on the first row of a newly created sixth column called Sum_calculated.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 13:23:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/AddColTotal-value-in-a-new-column/m-p/370963#M164051</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-01-03T13:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: AddColTotal value in a new column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/AddColTotal-value-in-a-new-column/m-p/370964#M164052</link>
      <description>&lt;P&gt;I think this answer can help your query &lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/478795/how-to-append-columns-based-on-searches-and-row-va.html"&gt;https://answers.splunk.com/answers/478795/how-to-append-columns-based-on-searches-and-row-va.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Please check the same.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 14:41:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/AddColTotal-value-in-a-new-column/m-p/370964#M164052</guid>
      <dc:creator>risgupta</dc:creator>
      <dc:date>2018-01-03T14:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: AddColTotal value in a new column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/AddColTotal-value-in-a-new-column/m-p/370965#M164053</link>
      <description>&lt;P&gt;Hey @zacksoft&lt;/P&gt;

&lt;P&gt;As per your comments you want total of third column in the new column right?&lt;BR /&gt;
Let suppose your third column name is &lt;CODE&gt;third_column&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Then your query will be &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your base search with all 5 columns | eventstats sum(third_column) as total 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;After this you will get the total which will be reflected at every line in the new column called total &lt;/P&gt;

&lt;P&gt;Another solution is if you are just interested in total &lt;BR /&gt;
Then try this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your base search will all 5 columns | addcoltotals third_column | tail 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Let me know if this helps you!&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 16:06:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/AddColTotal-value-in-a-new-column/m-p/370965#M164053</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-03T16:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: AddColTotal value in a new column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/AddColTotal-value-in-a-new-column/m-p/370966#M164054</link>
      <description>&lt;P&gt;hey, @zacksoft have you tried above two queries?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 07:05:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/AddColTotal-value-in-a-new-column/m-p/370966#M164054</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-04T07:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: AddColTotal value in a new column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/AddColTotal-value-in-a-new-column/m-p/370967#M164055</link>
      <description>&lt;P&gt;I'm trying this now.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 07:48:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/AddColTotal-value-in-a-new-column/m-p/370967#M164055</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-01-04T07:48:41Z</dc:date>
    </item>
    <item>
      <title>Re: AddColTotal value in a new column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/AddColTotal-value-in-a-new-column/m-p/370968#M164056</link>
      <description>&lt;P&gt;Hi @mayurr98,&lt;/P&gt;

&lt;P&gt;I tried both the queries , both works . I am more interested towards the first query.&lt;BR /&gt;
The only thing is, it shows the sum of third row in a newly created column called total "in every row".&lt;BR /&gt;
Is it possible to have the sum only in the first row ?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 08:10:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/AddColTotal-value-in-a-new-column/m-p/370968#M164056</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-01-04T08:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: AddColTotal value in a new column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/AddColTotal-value-in-a-new-column/m-p/370969#M164057</link>
      <description>&lt;P&gt;hey, you can show it using &lt;CODE&gt;appendcols&lt;/CODE&gt; command but it will take longer to run.&lt;BR /&gt;
Try this !&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your base search with all 5 columns | appendcols [Your base search with all 5 columns  | eventstats sum(third_column) as total | head 1]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;otherwise, i do not think any other solution for this!&lt;BR /&gt;
let me know if this helps you!&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 10:06:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/AddColTotal-value-in-a-new-column/m-p/370969#M164057</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-04T10:06:43Z</dc:date>
    </item>
  </channel>
</rss>

