<?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: adding/appending a row to get differences between cells above in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/adding-appending-a-row-to-get-differences-between-cells-above/m-p/238416#M70820</link>
    <description>&lt;P&gt;tks,&lt;/P&gt;

&lt;P&gt;that gives me &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;_time   a   b
1   2016-03-14 09:49:32 2   1
2   2016-03-14 09:49:32 3   2
3   2016-03-14 09:49:32 1.500000    2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but how do I control the 3rd row value for _time to be &lt;CODE&gt;something else&lt;/CODE&gt; as opposed to &lt;CODE&gt;2016-03-14 09:49:32&lt;/CODE&gt;? &lt;/P&gt;

&lt;P&gt;I could use &lt;A href="https://answers.splunk.com/answers/378906/can-i-change-the-values-of-a-specific-column-given.html"&gt;this&lt;/A&gt;  but I don't think the approach would work, unless  know the values of b and c in row 3.&lt;/P&gt;</description>
    <pubDate>Sun, 13 Mar 2016 20:54:20 GMT</pubDate>
    <dc:creator>HattrickNZ</dc:creator>
    <dc:date>2016-03-13T20:54:20Z</dc:date>
    <item>
      <title>adding/appending a row to get differences between cells above</title>
      <link>https://community.splunk.com/t5/Splunk-Search/adding-appending-a-row-to-get-differences-between-cells-above/m-p/238414#M70818</link>
      <description>&lt;P&gt;I have a search giving me a table with row 1 and 2 below: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    _time   A   B   C   D   
1   2015-02 1   3   5   7    
2   2016-02 2   4   6   8   
3    diff   2/1 4/3 6/5 8/7
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to add row 3 giving me a value e.g 2/1=2 ... etc &lt;/P&gt;

&lt;P&gt;How do I achieve this? &lt;/P&gt;

&lt;P&gt;I know I can use &lt;A href="https://answers.splunk.com/answers/368616/how-to-add-a-table-column-that-does-operations-in.html"&gt;delta&lt;/A&gt; if I was to add a column getting the differences but here I want to add a row with the difference in the column.&lt;BR /&gt;&lt;BR /&gt;
I thought appendpipe could be an option here but I think that just just works for getting max, min, sum....etc&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2016 02:40:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/adding-appending-a-row-to-get-differences-between-cells-above/m-p/238414#M70818</guid>
      <dc:creator>HattrickNZ</dc:creator>
      <dc:date>2016-03-09T02:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: adding/appending a row to get differences between cells above</title>
      <link>https://community.splunk.com/t5/Splunk-Search/adding-appending-a-row-to-get-differences-between-cells-above/m-p/238415#M70819</link>
      <description>&lt;P&gt;This seems clumsy, but it works (the first line just sets up data to make this run anywhere).&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults count=2 | streamstats count as a | eval a=a+1 | streamstats count as b
| appendpipe [ streamstats window=1 current=f last(b) as last_b last(a) as last_a | tail 1 | eval b=b/last_b | eval a=a/last_a | fields - last*]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Mar 2016 08:48:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/adding-appending-a-row-to-get-differences-between-cells-above/m-p/238415#M70819</guid>
      <dc:creator>jeffland</dc:creator>
      <dc:date>2016-03-09T08:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: adding/appending a row to get differences between cells above</title>
      <link>https://community.splunk.com/t5/Splunk-Search/adding-appending-a-row-to-get-differences-between-cells-above/m-p/238416#M70820</link>
      <description>&lt;P&gt;tks,&lt;/P&gt;

&lt;P&gt;that gives me &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;_time   a   b
1   2016-03-14 09:49:32 2   1
2   2016-03-14 09:49:32 3   2
3   2016-03-14 09:49:32 1.500000    2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but how do I control the 3rd row value for _time to be &lt;CODE&gt;something else&lt;/CODE&gt; as opposed to &lt;CODE&gt;2016-03-14 09:49:32&lt;/CODE&gt;? &lt;/P&gt;

&lt;P&gt;I could use &lt;A href="https://answers.splunk.com/answers/378906/can-i-change-the-values-of-a-specific-column-given.html"&gt;this&lt;/A&gt;  but I don't think the approach would work, unless  know the values of b and c in row 3.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Mar 2016 20:54:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/adding-appending-a-row-to-get-differences-between-cells-above/m-p/238416#M70820</guid>
      <dc:creator>HattrickNZ</dc:creator>
      <dc:date>2016-03-13T20:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: adding/appending a row to get differences between cells above</title>
      <link>https://community.splunk.com/t5/Splunk-Search/adding-appending-a-row-to-get-differences-between-cells-above/m-p/238417#M70821</link>
      <description>&lt;P&gt;You can either use &lt;CODE&gt;| streamstats count | eval _time=if(count=="3", "something else", _time)&lt;/CODE&gt; for that if that's all you need.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2016 19:16:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/adding-appending-a-row-to-get-differences-between-cells-above/m-p/238417#M70821</guid>
      <dc:creator>jeffland</dc:creator>
      <dc:date>2016-03-16T19:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: adding/appending a row to get differences between cells above</title>
      <link>https://community.splunk.com/t5/Splunk-Search/adding-appending-a-row-to-get-differences-between-cells-above/m-p/238418#M70822</link>
      <description>&lt;P&gt;tks but I got this to work by simply doing &lt;CODE&gt;eval _time="something else" |&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2016 21:52:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/adding-appending-a-row-to-get-differences-between-cells-above/m-p/238418#M70822</guid>
      <dc:creator>HattrickNZ</dc:creator>
      <dc:date>2016-03-16T21:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: adding/appending a row to get differences between cells above</title>
      <link>https://community.splunk.com/t5/Splunk-Search/adding-appending-a-row-to-get-differences-between-cells-above/m-p/238419#M70823</link>
      <description>&lt;P&gt;That will change every line, but I'm glad it works for you.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2016 08:44:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/adding-appending-a-row-to-get-differences-between-cells-above/m-p/238419#M70823</guid>
      <dc:creator>jeffland</dc:creator>
      <dc:date>2016-03-18T08:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: adding/appending a row to get differences between cells above</title>
      <link>https://community.splunk.com/t5/Splunk-Search/adding-appending-a-row-to-get-differences-between-cells-above/m-p/238420#M70824</link>
      <description>&lt;P&gt;tks but that did not matter, full example for reference. &lt;CODE&gt;| makeresults count=2 | streamstats count as A | eval A=A+1 | streamstats count as b | eval b=b+10 | streamstats count as c | eval c=c+11  | appendpipe [ streamstats window=1 current=f last(b) as last_b last(a) as last_a last(c) as last_c | tail 1 | eval b=b/last_b | eval a=a/last_a | eval c=c/last_c | eval _time="something else" | fields - last*]&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Mar 2016 18:35:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/adding-appending-a-row-to-get-differences-between-cells-above/m-p/238420#M70824</guid>
      <dc:creator>HattrickNZ</dc:creator>
      <dc:date>2016-03-20T18:35:34Z</dc:date>
    </item>
  </channel>
</rss>

