<?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 How to create couple of values in order to compare both field value in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-couple-of-values-in-order-to-compare-both-field/m-p/536450#M151679</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my raw data :&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ID, Version, Date, Status
10874381,1,2020-01-15T08:36:00Z,New
10874381,1,2020-01-15T08:46:00Z,Completed - Action Performed
14688643,1,2016-10-06T06:30:00Z,New
14688643,1,2016-10-07T08:32:00Z,Investigating
14688643,1,2016-10-24T15:10:00Z,Completed - Nothing Found&lt;/LI-CODE&gt;&lt;P&gt;I need to create another field for adding informations to this data. To do that i need to create couple of data.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Record Number | Status 1     | Status 2                    | Result
10874384      | New          | Completed - Action Perfomed | Completed Actions
14688643      | New          | Investigating               | Work
14688643      | Investigating| Completed - Nothing Found   | Completed&lt;/LI-CODE&gt;&lt;P&gt;I can not know in advance how many status could be by id (maybe 1, 2, 7 or more).&lt;/P&gt;&lt;P&gt;I do not know how to create couple with two different event in splunk.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Clement&lt;/P&gt;</description>
    <pubDate>Wed, 20 Jan 2021 08:50:51 GMT</pubDate>
    <dc:creator>cros</dc:creator>
    <dc:date>2021-01-20T08:50:51Z</dc:date>
    <item>
      <title>How to create couple of values in order to compare both field value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-couple-of-values-in-order-to-compare-both-field/m-p/536450#M151679</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my raw data :&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ID, Version, Date, Status
10874381,1,2020-01-15T08:36:00Z,New
10874381,1,2020-01-15T08:46:00Z,Completed - Action Performed
14688643,1,2016-10-06T06:30:00Z,New
14688643,1,2016-10-07T08:32:00Z,Investigating
14688643,1,2016-10-24T15:10:00Z,Completed - Nothing Found&lt;/LI-CODE&gt;&lt;P&gt;I need to create another field for adding informations to this data. To do that i need to create couple of data.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Record Number | Status 1     | Status 2                    | Result
10874384      | New          | Completed - Action Perfomed | Completed Actions
14688643      | New          | Investigating               | Work
14688643      | Investigating| Completed - Nothing Found   | Completed&lt;/LI-CODE&gt;&lt;P&gt;I can not know in advance how many status could be by id (maybe 1, 2, 7 or more).&lt;/P&gt;&lt;P&gt;I do not know how to create couple with two different event in splunk.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Clement&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2021 08:50:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-couple-of-values-in-order-to-compare-both-field/m-p/536450#M151679</guid>
      <dc:creator>cros</dc:creator>
      <dc:date>2021-01-20T08:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to create couple of values in order to compare both field value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-couple-of-values-in-order-to-compare-both-field/m-p/536472#M151683</link>
      <description>&lt;LI-CODE lang="markup"&gt;index=_internal | head 1 | fields _raw
| eval _raw="ID, Version, Date, Status
10874381,1,2020-01-15T08:36:00Z,New
10874381,1,2020-01-15T08:46:00Z,Completed - Action Performed
14688643,1,2016-10-06T06:30:00Z,New
14688643,1,2016-10-07T08:32:00Z,Investigating
14688643,1,2016-10-24T15:10:00Z,Completed - Nothing Found"
| multikv forceheader=1 
| table ID, Version, Date, Status
| rename COMMENT as "the logic"
| streamstats window=2 list(Status) as tmp_status by ID
| where mvcount(tmp_status) &amp;gt; 1
| eval Status_1=mvindex(tmp_status,0),Status_2=mvindex(tmp_status,1)
| rex field=Status_2 "(?&amp;lt;Result&amp;gt;Completed)"
| eval Result=if(isnull(Result),"Work",Result)
| table ID Status_* Result
| rename ID as Record_number&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 20 Jan 2021 11:11:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-couple-of-values-in-order-to-compare-both-field/m-p/536472#M151683</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2021-01-20T11:11:51Z</dc:date>
    </item>
  </channel>
</rss>

