<?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: difference between specific field from two seperate events with time difference of 28sec in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/difference-between-specific-field-from-two-seperate-events-with/m-p/384803#M25231</link>
    <description>&lt;P&gt;Try something like this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(your search that gets the records you want, including unique sid that links the multiple records)
| rex field=_raw "(?&amp;lt;CareAboutFlag&amp;gt;0x8b0122|0x8b0122&amp;gt;)"
| where isnotnull(CareAboutFlag)
| stats min(_time) as _time 
    max(_time) as end_time 
    range(_time) as duration 
    list(_raw) as stufftokeepjustincase 
    by sid 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you need the stuff from the other records, then do this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(your search that gets the records you want, including unique sid that links the multiple records)
| rex field=_raw "(?&amp;lt;CareAboutFlag&amp;gt;0x8b0122|0x8b0122&amp;gt;)"
| stats min(eval(case(isnotnull(CareAboutFlag),_time))) as _time 
    max(eval(case(isnotnull(CareAboutFlag),_time))) as end_time 
    range(eval(case(isnotnull(CareAboutFlag),_time))) as duration 
    list(_time) as timestokeepjustincase 
    list(_raw) as stufftokeepjustincase 
    by sid 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 20 Jun 2018 17:46:58 GMT</pubDate>
    <dc:creator>DalJeanis</dc:creator>
    <dc:date>2018-06-20T17:46:58Z</dc:date>
    <item>
      <title>difference between specific field from two seperate events with time difference of 28sec</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/difference-between-specific-field-from-two-seperate-events-with/m-p/384799#M25227</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I have a following data:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;_time                 rtIO     sid      combination                           diffval
2018-06-13 13:30:59 7497707 0x8b0122    0x8b0122-0xef0101-0000-0000-0000-0000   7543374 &amp;lt;-row with 0x8b0122           
2018-06-13 13:30:59 7497757 0x8b0120    0x8b0120-0xef0081-0000-0000-0000-0000   50      &amp;lt;-row with 0x8b0120
2018-06-13 13:30:59 175999  0x8b0081    0x8b0081-0xef00ef-0000-0000-0000-0000   7321758
2018-06-13 13:30:59 334641  0x8b0081    0x8b0081-0xef00ef-0001-0000-0000-0000   158642
2018-06-13 13:30:59 333123  0x8b0081    0x8b0081-0xef00ef-0001-0000-0000-0000   1518
2018-06-13 13:30:59 176163  0x8b0081    0x8b0081-0xef00ef-0000-0000-0000-0000   156960

2018-06-13 13:31:27 7583623 0x8b0122    0x8b0122-0xef0101-0000-0000-0000-0000   7543374  &amp;lt;-row with 0x8b0122
2018-06-13 13:31:27 7583682 0x8b0120    0x8b0120-0xef0081-0000-0000-0000-0000   59       &amp;lt;-row with 0x8b0120
2018-06-13 13:31:27 176183  0x8b0081    0x8b0081-0xef00ef-0000-0000-0000-0000   7407499
2018-06-13 13:31:27 334954  0x8b0081    0x8b0081-0xef00ef-0001-0000-0000-0000   158771
2018-06-13 13:31:27 333477  0x8b0081    0x8b0081-0xef00ef-0001-0000-0000-0000   1477
2018-06-13 13:31:27 176332  0x8b0081    0x8b0081-0xef00ef-0000-0000-0000-0000   157145

2018-06-13 13:31:56 7669908 0x8b0122    0x8b0122-0xef0101-0000-0000-0000-0000   7629658  &amp;lt;-row with 0x8b0122
2018-06-13 13:31:56 7669971 0x8b0120    0x8b0120-0xef0081-0000-0000-0000-0000   63       &amp;lt;-row with 0x8b0120
2018-06-13 13:31:56 176338  0x8b0081    0x8b0081-0xef00ef-0000-0000-0000-0000   7493633
2018-06-13 13:31:56 335299  0x8b0081    0x8b0081-0xef00ef-0001-0000-0000-0000   158961
2018-06-13 13:31:56 333828  0x8b0081    0x8b0081-0xef00ef-0001-0000-0000-0000   1471
2018-06-13 13:31:56 176486  0x8b0081    0x8b0081-0xef00ef-0000-0000-0000-0000   157342

2018-06-13 13:32:24 7755837 0x8b0122    0x8b0122-0xef0101-0000-0000-0000-0000   7715575 &amp;lt;-row with 0x8b0122
2018-06-13 13:32:24 7755910 0x8b0120    0x8b0120-0xef0081-0000-0000-0000-0000   73      &amp;lt;-row with 0x8b0120
2018-06-13 13:32:24 176492  0x8b0081    0x8b0081-0xef00ef-0000-0000-0000-0000   7579418
2018-06-13 13:32:24 335660  0x8b0081    0x8b0081-0xef00ef-0001-0000-0000-0000   159168
2018-06-13 13:32:24 334189  0x8b0081    0x8b0081-0xef00ef-0001-0000-0000-0000   1471
2018-06-13 13:32:24 176626  0x8b0081    0x8b0081-0xef00ef-0000-0000-0000-0000   157563

2018-06-13 13:32:52 7841663 0x8b0122    0x8b0122-0xef0101-0000-0000-0000-0000   7801388 &amp;lt;-row with 0x8b0122
2018-06-13 13:32:52 7841674 0x8b0120    0x8b0120-0xef0081-0000-0000-0000-0000   11      &amp;lt;-row with 0x8b0120
2018-06-13 13:32:52 176751  0x8b0081    0x8b0081-0xef00ef-0000-0000-0000-0000   7664923
2018-06-13 13:32:52 336023  0x8b0081    0x8b0081-0xef00ef-0001-0000-0000-0000   159272
2018-06-13 13:32:52 334526  0x8b0081    0x8b0081-0xef00ef-0001-0000-0000-0000   1497
2018-06-13 13:32:52 176910  0x8b0081    0x8b0081-0xef00ef-0000-0000-0000-0000   157616
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In the above rows, each bunch of rows occured at a same time. I need the difference of 2nd column for rows marked &lt;CODE&gt;&amp;lt;-row with 0x8b0122&lt;/CODE&gt; as above with time diff of 28 sec.Similarly for  &lt;CODE&gt;&amp;lt;-row with 0x8b0120&lt;/CODE&gt;. Here the number of rows are 6 but it may differ.&lt;/P&gt;

&lt;P&gt;I used a query below but need to specify p=6 with delta.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="test101" |fields sid,did,lun,rtIO,rtIOt|sort _time |eval combination=sid."-".did."-".lun|delta rtIO as diffval p=6|delta _time as timediff|eval diffval=abs(diffval) |table _time,rtIOt,sid,combination,diffval
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Instead of using &lt;CODE&gt;p=6&lt;/CODE&gt; as above how to get the difference of rows with time diff of 28sec for the unique values for column &lt;CODE&gt;combination&lt;/CODE&gt;?&lt;BR /&gt;
Also I need to display the &lt;CODE&gt;diffval&lt;/CODE&gt; with time in a chart, instead of the table command above.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2018 12:53:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/difference-between-specific-field-from-two-seperate-events-with/m-p/384799#M25227</guid>
      <dc:creator>sawgata12345</dc:creator>
      <dc:date>2018-06-15T12:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: difference between specific field from two seperate events with time difference of 28sec</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/difference-between-specific-field-from-two-seperate-events-with/m-p/384800#M25228</link>
      <description>&lt;P&gt;Hi @sawgata12345,&lt;/P&gt;

&lt;P&gt;If you are always looking for difference between same SID and only for two rowa, then try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search | fields _time rtIO sid combination
|eventstats list(rtIO) as rtioList by combination|eval difference=abs(tonumber(mvindex(rtioList,0))-tonumber(mvindex(rtioList,1)))
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Jun 2018 15:24:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/difference-between-specific-field-from-two-seperate-events-with/m-p/384800#M25228</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-06-15T15:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: difference between specific field from two seperate events with time difference of 28sec</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/difference-between-specific-field-from-two-seperate-events-with/m-p/384801#M25229</link>
      <description>&lt;P&gt;hi,&lt;BR /&gt;
Thanks renjith.&lt;/P&gt;

&lt;P&gt;I need the diff between first row&lt;BR /&gt;
2018-06-13 13:30:59 7497707 0x8b0122 0x8b0122-0xef0101-0000-0000-0000-0000 &amp;gt;&amp;gt;row with 0x8b0122&lt;BR /&gt;&lt;BR /&gt;
and seventh row &lt;BR /&gt;
2018-06-13 13:31:27 7583623 0x8b0122 0x8b0122-0xef0101-0000-0000-0000-0000 7543374 &amp;gt;&amp;gt;row with 0x8b0122 &lt;/P&gt;

&lt;P&gt;then 7th row &lt;BR /&gt;
2018-06-13 13:31:27 7583623 0x8b0122 0x8b0122-0xef0101-0000-0000-0000-0000 7543374 &amp;gt;&amp;gt;row with 0x8b0122&lt;BR /&gt;
and 13th row&lt;BR /&gt;
2018-06-13 13:31:56 7669908 0x8b0122 0x8b0122-0xef0101-0000-0000-0000-0000 7629658 &amp;gt;&amp;gt;row with 0x8b0122&lt;/P&gt;

&lt;P&gt;then 19th row  - 13throw&lt;BR /&gt;
2018-06-13 13:32:24 7755837 0x8b0122 0x8b0122-0xef0101-0000-0000-0000-0000 7715575 &amp;gt;&amp;gt;row with 0x8b0122&lt;BR /&gt;
2018-06-13 13:31:56 7669908 0x8b0122 0x8b0122-0xef0101-0000-0000-0000-0000 7629658 &amp;gt;&amp;gt;row with 0x8b0122&lt;/P&gt;

&lt;P&gt;similarly for the 2nd row and 8th row&lt;BR /&gt;
2018-06-13 13:30:59 7497757 0x8b0120 0x8b0120-0xef0081-0000-0000-0000-0000 50 &amp;gt;&amp;gt;row with 0x8b0120&lt;BR /&gt;
2018-06-13 13:31:27 7583682 0x8b0120 0x8b0120-0xef0081-0000-0000-0000-0000 59 &amp;gt;&amp;gt;row with 0x8b0120 &lt;/P&gt;

&lt;P&gt;then 8th row and 14th row&lt;BR /&gt;
2018-06-13 13:31:27 7583682 0x8b0120 0x8b0120-0xef0081-0000-0000-0000-0000 59 &amp;gt;&amp;gt;row with 0x8b0120 &lt;BR /&gt;
2018-06-13 13:31:56 7669971 0x8b0120 0x8b0120-0xef0081-0000-0000-0000-0000 63 &amp;gt;&amp;gt;row with 0x8b0120 &lt;/P&gt;

&lt;P&gt;Similarly&lt;BR /&gt;
 9throw -3rd row &lt;BR /&gt;
 15th - 9th row&lt;/P&gt;

&lt;P&gt;I combined my query with yours ,i think 'delta rtIO as diffval' is not required from my query as you have used "eventstats" function &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;index="test101" |fields sid,did,lun,rtIO,rtIOt|sort _time |eval combination=sid."-".did."-".lun| fields _time rtIO sid combination|eventstats list(rtIO) as rtioList by combination|eval difference=abs(tonumber(mvindex(rtioList,0))-tonumber(mvindex(rtioList,1))) |table _time,sid,did,combination,,difference&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;The output is having in "difference" column always the diff of the 7th -1st (7583623 -7497707 ), even when the "difference" should contain values of 13th-7th(7669908 - 7583623 ) row/19th -13th(7755837 -7669908 ) row  etc&lt;/P&gt;

&lt;P&gt;The output from running the combined query is below. This having the fixed difference repeated for each time interval of 28 seconds.&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;Blockquote&lt;BR /&gt;
2018-06-13 13:30:59 0x8b0122    0xef0101    0000-0000-0000-0000 0x8b0122-0xef0101-0000-0000-0000-0000   85916&lt;BR /&gt;
2018-06-13 13:30:59 0x8b0120    0xef0081    0000-0000-0000-0000 0x8b0120-0xef0081-0000-0000-0000-0000   85925&lt;BR /&gt;
2018-06-13 13:30:59 0x8b0081    0xef00ef    0000-0000-0000-0000 0x8b0081-0xef00ef-0000-0000-0000-0000   164&lt;BR /&gt;
2018-06-13 13:30:59 0x8b0081    0xef00ef    0001-0000-0000-0000 0x8b0081-0xef00ef-0001-0000-0000-0000   1518&lt;BR /&gt;
2018-06-13 13:30:59 0x8b0081    0xef00ef    0001-0000-0000-0000 0x8b0081-0xef00ef-0001-0000-0000-0000   1518&lt;BR /&gt;
2018-06-13 13:30:59 0x8b0081    0xef00ef    0000-0000-0000-0000 0x8b0081-0xef00ef-0000-0000-0000-0000   164&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;2018-06-13 13:31:27 0x8b0122    0xef0101    0000-0000-0000-0000 0x8b0122-0xef0101-0000-0000-0000-0000   85916&lt;BR /&gt;
2018-06-13 13:31:27 0x8b0120    0xef0081    0000-0000-0000-0000 0x8b0120-0xef0081-0000-0000-0000-0000   85925&lt;BR /&gt;
2018-06-13 13:31:27 0x8b0081    0xef00ef    0000-0000-0000-0000 0x8b0081-0xef00ef-0000-0000-0000-0000   164&lt;BR /&gt;
2018-06-13 13:31:27 0x8b0081    0xef00ef    0001-0000-0000-0000 0x8b0081-0xef00ef-0001-0000-0000-0000   1518&lt;BR /&gt;
2018-06-13 13:31:27 0x8b0081    0xef00ef    0001-0000-0000-0000 0x8b0081-0xef00ef-0001-0000-0000-0000   1518&lt;BR /&gt;
2018-06-13 13:31:27 0x8b0081    0xef00ef    0000-0000-0000-0000 0x8b0081-0xef00ef-0000-0000-0000-0000   164&lt;/P&gt;

&lt;P&gt;2018-06-13 13:31:56 0x8b0122    0xef0101    0000-0000-0000-0000 0x8b0122-0xef0101-0000-0000-0000-0000   85916&lt;BR /&gt;
2018-06-13 13:31:56 0x8b0120    0xef0081    0000-0000-0000-0000 0x8b0120-0xef0081-0000-0000-0000-0000   85925&lt;BR /&gt;
2018-06-13 13:31:56 0x8b0081    0xef00ef    0000-0000-0000-0000 0x8b0081-0xef00ef-0000-0000-0000-0000   164&lt;BR /&gt;
2018-06-13 13:31:56 0x8b0081    0xef00ef    0001-0000-0000-0000 0x8b0081-0xef00ef-0001-0000-0000-0000   1518&lt;BR /&gt;
2018-06-13 13:31:56 0x8b0081    0xef00ef    0001-0000-0000-0000 0x8b0081-0xef00ef-0001-0000-0000-0000   1518&lt;BR /&gt;
2018-06-13 13:31:56 0x8b0081    0xef00ef    0000-0000-0000-0000 0x8b0081-0xef00ef-0000-0000-0000-0000   164&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;Blockquote&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Mon, 18 Jun 2018 10:27:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/difference-between-specific-field-from-two-seperate-events-with/m-p/384801#M25229</guid>
      <dc:creator>sawgata12345</dc:creator>
      <dc:date>2018-06-18T10:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: difference between specific field from two seperate events with time difference of 28sec</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/difference-between-specific-field-from-two-seperate-events-with/m-p/384802#M25230</link>
      <description>&lt;P&gt;Hi @sawgata12345,&lt;/P&gt;

&lt;P&gt;Ok so its not just between 1st and 7th and 2nd and 8th. Do you have any unique field to distinguish between each row? For e.g. from your data, if we take 4th and 5th rows from first section, there is nothing which could distinguish those rows and if you sort by _time it might not be correct because all the rows in a section have same time &lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 11:19:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/difference-between-specific-field-from-two-seperate-events-with/m-p/384802#M25230</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-06-20T11:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: difference between specific field from two seperate events with time difference of 28sec</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/difference-between-specific-field-from-two-seperate-events-with/m-p/384803#M25231</link>
      <description>&lt;P&gt;Try something like this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(your search that gets the records you want, including unique sid that links the multiple records)
| rex field=_raw "(?&amp;lt;CareAboutFlag&amp;gt;0x8b0122|0x8b0122&amp;gt;)"
| where isnotnull(CareAboutFlag)
| stats min(_time) as _time 
    max(_time) as end_time 
    range(_time) as duration 
    list(_raw) as stufftokeepjustincase 
    by sid 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you need the stuff from the other records, then do this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(your search that gets the records you want, including unique sid that links the multiple records)
| rex field=_raw "(?&amp;lt;CareAboutFlag&amp;gt;0x8b0122|0x8b0122&amp;gt;)"
| stats min(eval(case(isnotnull(CareAboutFlag),_time))) as _time 
    max(eval(case(isnotnull(CareAboutFlag),_time))) as end_time 
    range(eval(case(isnotnull(CareAboutFlag),_time))) as duration 
    list(_time) as timestokeepjustincase 
    list(_raw) as stufftokeepjustincase 
    by sid 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Jun 2018 17:46:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/difference-between-specific-field-from-two-seperate-events-with/m-p/384803#M25231</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2018-06-20T17:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: difference between specific field from two seperate events with time difference of 28sec</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/difference-between-specific-field-from-two-seperate-events-with/m-p/384804#M25232</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
the time part in the output is fixed now from device end, Now the output is coming like this. For a bunch of rows with&lt;BR /&gt;
same time combination column is different for  each row.&lt;/P&gt;

&lt;P&gt;_time                                combination                                                           samStm         samEtm                rtIO       timediff&lt;BR /&gt;&lt;BR /&gt;
2018-06-23 13:30:51 &lt;STRONG&gt;0x8b00e0-0xef0102-0007-0000-0000-0000&lt;/STRONG&gt;   1529740851  1529740880      80726       29             &amp;gt;&amp;gt; this row 1&lt;BR /&gt;&lt;BR /&gt;
2018-06-23 13:30:51 0x8b00e0-0xef0102-0006-0000-0000-0000   1529740851  1529740880      80743       29             &amp;gt;&amp;gt; this row 2&lt;BR /&gt;
2018-06-23 13:30:51 0x8b00e0-0xef0102-0004-0000-0000-0000   1529740851  1529740880      80873       29             &amp;gt;&amp;gt; this row 3&lt;BR /&gt;
2018-06-23 13:30:51 0x8b00e0-0xef0102-0003-0000-0000-0000   1529740851  1529740880      80869       29             &amp;gt;&amp;gt; this row 4&lt;BR /&gt;
2018-06-23 13:30:51 0x8b00e0-0xef0102-0002-0000-0000-0000   1529740851  1529740980      81285       28&lt;BR /&gt;
....5 more different unique combinations between then&lt;BR /&gt;
2018-06-23 13:31:20 &lt;STRONG&gt;0x8b00e0-0xef0102-0007-0000-0000-0000&lt;/STRONG&gt;   1529740880  1529740908      81158       28             &amp;gt;&amp;gt; this row 1 repeated after 9 rows&lt;BR /&gt;&lt;BR /&gt;
2018-06-23 13:31:20 0x8b00e0-0xef0102-0006-0000-0000-0000   1529740880  1529740908      81172       28             &amp;gt;&amp;gt; this row 2 repeated after 9 rows&lt;BR /&gt;
2018-06-23 13:31:20 0x8b00e0-0xef0102-0004-0000-0000-0000   1529740880  1529740908      81298       28             &amp;gt;&amp;gt; this row 3 repeated after 9 rows&lt;BR /&gt;
2018-06-23 13:31:20 0x8b00e0-0xef0102-0003-0000-0000-0000   1529740880  1529740908      81293       28             &amp;gt;&amp;gt; this row 4 repeated after 9 rows&lt;BR /&gt;
2018-06-23 13:31:20 0x8b00e0-0xef0102-0002-0000-0000-0000   1529740880  1529740908      81285       28             &amp;gt;&amp;gt; this row 5 repeated after 9 rows &lt;BR /&gt;
... 2 more different unique combinations&lt;BR /&gt;&lt;BR /&gt;
2018-06-23 13:31:48 &lt;STRONG&gt;0x8b00e0-0xef0102-0007-0000-0000-0000&lt;/STRONG&gt;   1529740908  1529740916      81281       28              &amp;gt;&amp;gt; this row 1 repeated after 6 rows&lt;BR /&gt;
2018-06-23 13:31:48 0x8b00e0-0xef0102-0006-0000-0000-0000   1529740908  1529740916      81293       28             &amp;gt;&amp;gt; this row 2 repeated after 6 rows&lt;BR /&gt;
2018-06-23 13:31:48 0x8b00e0-0xef0102-0004-0000-0000-0000   1529740908  1529740916      81417       28             &amp;gt;&amp;gt; this row 3 repeated after 6 rows&lt;/P&gt;

&lt;P&gt;2018-06-23 13:32:26 &lt;STRONG&gt;0x8b00e0-0xef0102-0007-0000-0000-0000&lt;/STRONG&gt;   1529740946  1529740965      81562       19             &amp;gt;&amp;gt; this row 1 repeated after 2 rows &lt;BR /&gt;
2018-06-23 13:32:26 0x8b00e0-0xef0102-0006-0000-0000-0000   1529740946  1529740965      81572       19             &amp;gt;&amp;gt; this row 2 repeated after 2 rows&lt;BR /&gt;
2018-06-23 13:32:26 0x8b00e0-0xef0102-0004-0000-0000-0000   1529740946  1529740965      81695       19             &amp;gt;&amp;gt; this row 3 repeated after 2 rows&lt;BR /&gt;
After this the row 4 and row 5 is not sending any data.&lt;/P&gt;

&lt;P&gt;index=test101 |sort _time|fields sid,did,lun,rtIO,wtIO,samEtm,samStm|fields _time,rt,IO,wtIO, samEtm,samStm, sid, did, lun|eval combination=sid."-".did."-".lun|&lt;BR /&gt;
 &lt;STRONG&gt;delta rtIO as rtiodiff p=2&lt;/STRONG&gt;| eval timediff=samEtm-samStm|eval res=rtiodiff/timediff |table _time,combination,samStm,samEtm,rtIO,timediff&lt;/P&gt;

&lt;P&gt;I am using the query above but the part &lt;STRONG&gt;p=2&lt;/STRONG&gt; in (delta rtIO as rtiodiff p=2) is fixed. how to put a random value for this 'p'.&lt;BR /&gt;
The column header 'combination' is unique for each row. This unique combination for row 1 repeats after 9 rows first time, then again after 6 rows, then after 2 rows.&lt;BR /&gt;
Similarly row 2 repeats first after 9 rows then after 6 rows then after 2 rows.&lt;/P&gt;

&lt;P&gt;How to find the number of rows between the unique repeatation of row 1, row 2 etc. this needs to substitured in place of p=2 in delta part of the query.&lt;BR /&gt;
First time for row1 should be  &lt;STRONG&gt;'delta rtIO as rtiodiff p= 9&lt;/STRONG&gt;', 2nd time  '&lt;STRONG&gt;delta rtIO as rtiodiff p=6'&lt;/STRONG&gt;, and third time  '&lt;STRONG&gt;delta rtIO as rtiodiff p=2&lt;/STRONG&gt;'. &lt;/P&gt;

&lt;P&gt;This will not be always fixed. Later 100 rows may come between a unique repetition of row 1 again,sometimes only 5 rows after which row 1 comes again.&lt;BR /&gt;
That's why i need to know how many rows occured between row1 again appearing so we can put this count in place of &lt;STRONG&gt;p=2&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 10:06:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/difference-between-specific-field-from-two-seperate-events-with/m-p/384804#M25232</guid>
      <dc:creator>sawgata12345</dc:creator>
      <dc:date>2018-06-26T10:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: difference between specific field from two seperate events with time difference of 28sec</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/difference-between-specific-field-from-two-seperate-events-with/m-p/384805#M25233</link>
      <description>&lt;P&gt;I do not see any way to do this but for anybody interested in trying, here is a way to generate the sample events:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval raw="2018-06-13 13:30:59 7497707 0x8b0122    0x8b0122-0xef0101-0000-0000-0000-0000 7543374
2018-06-13 13:30:59 7497757 0x8b0120    0x8b0120-0xef0081-0000-0000-0000-0000   50
2018-06-13 13:30:59 175999  0x8b0081    0x8b0081-0xef00ef-0000-0000-0000-0000   7321758
2018-06-13 13:30:59 334641  0x8b0081    0x8b0081-0xef00ef-0001-0000-0000-0000   158642
2018-06-13 13:30:59 333123  0x8b0081    0x8b0081-0xef00ef-0001-0000-0000-0000   1518
2018-06-13 13:30:59 176163  0x8b0081    0x8b0081-0xef00ef-0000-0000-0000-0000   156960
2018-06-13 13:31:27 7583623 0x8b0122    0x8b0122-0xef0101-0000-0000-0000-0000   7543374
2018-06-13 13:31:27 7583682 0x8b0120    0x8b0120-0xef0081-0000-0000-0000-0000   59
2018-06-13 13:31:27 176183  0x8b0081    0x8b0081-0xef00ef-0000-0000-0000-0000   7407499
2018-06-13 13:31:27 334954  0x8b0081    0x8b0081-0xef00ef-0001-0000-0000-0000   158771
2018-06-13 13:31:27 333477  0x8b0081    0x8b0081-0xef00ef-0001-0000-0000-0000   1477
2018-06-13 13:31:27 176332  0x8b0081    0x8b0081-0xef00ef-0000-0000-0000-0000   157145
2018-06-13 13:31:56 7669908 0x8b0122    0x8b0122-0xef0101-0000-0000-0000-0000   7629658
2018-06-13 13:31:56 7669971 0x8b0120    0x8b0120-0xef0081-0000-0000-0000-0000   63
2018-06-13 13:31:56 176338  0x8b0081    0x8b0081-0xef00ef-0000-0000-0000-0000   7493633
2018-06-13 13:31:56 335299  0x8b0081    0x8b0081-0xef00ef-0001-0000-0000-0000   158961
2018-06-13 13:31:56 333828  0x8b0081    0x8b0081-0xef00ef-0001-0000-0000-0000   1471
2018-06-13 13:31:56 176486  0x8b0081    0x8b0081-0xef00ef-0000-0000-0000-0000   157342
2018-06-13 13:32:24 7755837 0x8b0122    0x8b0122-0xef0101-0000-0000-0000-0000   7715575
2018-06-13 13:32:24 7755910 0x8b0120    0x8b0120-0xef0081-0000-0000-0000-0000   73
2018-06-13 13:32:24 176492  0x8b0081    0x8b0081-0xef00ef-0000-0000-0000-0000   7579418
2018-06-13 13:32:24 335660  0x8b0081    0x8b0081-0xef00ef-0001-0000-0000-0000   159168
2018-06-13 13:32:24 334189  0x8b0081    0x8b0081-0xef00ef-0001-0000-0000-0000   1471
2018-06-13 13:32:24 176626  0x8b0081    0x8b0081-0xef00ef-0000-0000-0000-0000   157563
2018-06-13 13:32:52 7841663 0x8b0122    0x8b0122-0xef0101-0000-0000-0000-0000   7801388
2018-06-13 13:32:52 7841674 0x8b0120    0x8b0120-0xef0081-0000-0000-0000-0000   11
2018-06-13 13:32:52 176751  0x8b0081    0x8b0081-0xef00ef-0000-0000-0000-0000   7664923
2018-06-13 13:32:52 336023  0x8b0081    0x8b0081-0xef00ef-0001-0000-0000-0000   159272
2018-06-13 13:32:52 334526  0x8b0081    0x8b0081-0xef00ef-0001-0000-0000-0000   1497
2018-06-13 13:32:52 176910  0x8b0081    0x8b0081-0xef00ef-0000-0000-0000-0000   157616" 
| makemv raw delim="
" 
| mvexpand raw 
| rename raw AS _raw 
| rex "^(?&amp;lt;time&amp;gt;\S+\s\S+)\s+(?&amp;lt;rtIO&amp;gt;\S+)\s+(?&amp;lt;sid&amp;gt;\S+)\s+(?&amp;lt;combination&amp;gt;\S+)\s+(?&amp;lt;diffval&amp;gt;\S+)$" 
| eval _time=strptime(time, "%Y-%m-%d %H:%M:%S") 
| fields - _raw 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 01 Jul 2018 01:48:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/difference-between-specific-field-from-two-seperate-events-with/m-p/384805#M25233</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-07-01T01:48:55Z</dc:date>
    </item>
  </channel>
</rss>

