<?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: Compare the row values to the above row. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Compare-the-row-values-to-the-above-row/m-p/558989#M158803</link>
    <description>&lt;P&gt;thanks for the response ,&lt;BR /&gt;&lt;BR /&gt;yeah it should replaced by 7 only ,&lt;BR /&gt;it should replace with the higher value in the column.&lt;BR /&gt;&lt;BR /&gt;if our 4th row has the highest value , it should remains same.&lt;BR /&gt;the same should work for all the rows.&lt;BR /&gt;&lt;BR /&gt;thank you !!&lt;/P&gt;</description>
    <pubDate>Sun, 11 Jul 2021 14:37:50 GMT</pubDate>
    <dc:creator>vinod743374</dc:creator>
    <dc:date>2021-07-11T14:37:50Z</dc:date>
    <item>
      <title>Compare the row values to the above row.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-the-row-values-to-the-above-row/m-p/558959#M158794</link>
      <description>&lt;P&gt;Compare the row value with the above row value ,&lt;BR /&gt;if the above row value is grater than the&amp;nbsp; present row value, it should be replaced with the above value,&lt;BR /&gt;otherwise remains same.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vinod743374_0-1625974134313.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/15020iC2D66C635605D6FF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vinod743374_0-1625974134313.png" alt="vinod743374_0-1625974134313.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;i have a table like the above image,&lt;BR /&gt;you can observe date wise sum data , third row values should compare with the&amp;nbsp; second row , if it is grater than the above value it should replace with the higher value&amp;gt;&lt;BR /&gt;&lt;BR /&gt;if anyone suggest me any other method , it would be also appreciated.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;i think you guys understand, what i requested ,&lt;BR /&gt;&lt;BR /&gt;please help me out&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jul 2021 03:37:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-the-row-values-to-the-above-row/m-p/558959#M158794</guid>
      <dc:creator>vinod743374</dc:creator>
      <dc:date>2021-07-11T03:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: Compare the row values to the above row.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-the-row-values-to-the-above-row/m-p/558966#M158796</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/234515"&gt;@vinod743374&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please try this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Your_search
| streamstats window=2 earliest(A) as pre_A 
| eval A=if(pre_A&amp;gt;A,pre_A,A)&lt;/LI-CODE&gt;&lt;P&gt;or&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Your_search
| autoregress A as pre_A p=1
| eval A=if(pre_A&amp;gt;A,pre_A,A)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Sample Search :&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults | eval _raw="A	B	C
2	35	37
7	35	37
5	35	37" | multikv forceheader=1
| table _time A	B	C
| streamstats window=2 earliest(A) as pre_A 
| eval A=if(pre_A&amp;gt;A,pre_A,A)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults | eval _raw="A	B	C
2	35	37
7	35	37
5	35	37" | multikv forceheader=1
| table _time A	B	C
| autoregress A as pre_A p=1
| eval A=if(pre_A&amp;gt;A,pre_A,A)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;▄︻̷̿┻̿═━一&lt;BR /&gt;&lt;BR /&gt;If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jul 2021 04:54:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-the-row-values-to-the-above-row/m-p/558966#M158796</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-07-11T04:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: Compare the row values to the above row.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-the-row-values-to-the-above-row/m-p/558975#M158798</link>
      <description>&lt;P&gt;Please can you clarify what would happen if a fourth row had value 4 in the second column, should this be replaced by 5 from row 3 or 7 from row 2 via row 3?&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jul 2021 10:35:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-the-row-values-to-the-above-row/m-p/558975#M158798</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-07-11T10:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: Compare the row values to the above row.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-the-row-values-to-the-above-row/m-p/558988#M158802</link>
      <description>&lt;P&gt;thank you for the response &amp;lt;&lt;BR /&gt;&lt;BR /&gt;with your query,&lt;BR /&gt;it replaces with the&amp;nbsp; the previous value ,&lt;BR /&gt;but in my case , it should return when ever the value is grater than the present value, otherwise it should remain same.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jul 2021 14:33:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-the-row-values-to-the-above-row/m-p/558988#M158802</guid>
      <dc:creator>vinod743374</dc:creator>
      <dc:date>2021-07-11T14:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: Compare the row values to the above row.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-the-row-values-to-the-above-row/m-p/558989#M158803</link>
      <description>&lt;P&gt;thanks for the response ,&lt;BR /&gt;&lt;BR /&gt;yeah it should replaced by 7 only ,&lt;BR /&gt;it should replace with the higher value in the column.&lt;BR /&gt;&lt;BR /&gt;if our 4th row has the highest value , it should remains same.&lt;BR /&gt;the same should work for all the rows.&lt;BR /&gt;&lt;BR /&gt;thank you !!&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jul 2021 14:37:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-the-row-values-to-the-above-row/m-p/558989#M158803</guid>
      <dc:creator>vinod743374</dc:creator>
      <dc:date>2021-07-11T14:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: Compare the row values to the above row.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-the-row-values-to-the-above-row/m-p/558990#M158804</link>
      <description>&lt;LI-CODE lang="markup"&gt;| streamstats max('Aaa Server-Arista') as "Aaa Server-Arista"&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 11 Jul 2021 14:44:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-the-row-values-to-the-above-row/m-p/558990#M158804</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-07-11T14:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: Compare the row values to the above row.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-the-row-values-to-the-above-row/m-p/558991#M158805</link>
      <description>&lt;P&gt;if possible , can't we generalize the query for all the rows.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jul 2021 14:49:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-the-row-values-to-the-above-row/m-p/558991#M158805</guid>
      <dc:creator>vinod743374</dc:creator>
      <dc:date>2021-07-11T14:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: Compare the row values to the above row.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-the-row-values-to-the-above-row/m-p/558992#M158806</link>
      <description>&lt;LI-CODE lang="markup"&gt;| streamstats max(*) as *&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 11 Jul 2021 14:51:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-the-row-values-to-the-above-row/m-p/558992#M158806</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-07-11T14:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Compare the row values to the above row.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-the-row-values-to-the-above-row/m-p/558993#M158807</link>
      <description>&lt;P&gt;It working ,&lt;BR /&gt;Thankyou so much !!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jul 2021 15:10:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-the-row-values-to-the-above-row/m-p/558993#M158807</guid>
      <dc:creator>vinod743374</dc:creator>
      <dc:date>2021-07-11T15:10:58Z</dc:date>
    </item>
  </channel>
</rss>

