<?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 Correlating field values and finding where they match in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Correlating-field-values-and-finding-where-they-match/m-p/317861#M95105</link>
    <description>&lt;P&gt;Hello guys,&lt;/P&gt;

&lt;P&gt;So I have struggled writing search pipeline for this senario:&lt;/P&gt;

&lt;P&gt;I have comparing unique id(numerical value) in 3 different fields (id_1,id_2,id_3). The data looks something like:&lt;BR /&gt;
id_1 |   id_2 |  id_3&lt;BR /&gt;
1          3    4&lt;BR /&gt;
2          4    5&lt;BR /&gt;
3          5    6&lt;BR /&gt;
4         6     5 &lt;BR /&gt;
4         5   3 &lt;/P&gt;

&lt;P&gt;I want to find out where all three columns have a matching value.&lt;BR /&gt;
For example, here 4 would be a unique value that appears in all three fields.&lt;/P&gt;

&lt;P&gt;I have run different seaches:&lt;BR /&gt;
...|table id_1.id_2,id_3|where id_1==id_2==id_3&lt;BR /&gt;
...|eval matchname=id_2|where id_1==matchname   &amp;lt;-tried with 2 fields first, no result&lt;BR /&gt;
...|table id_1, id_2|eval matchname=if(id_1==id_2,"y","n")&lt;BR /&gt;
...|stats values(id_1) by id_2,id_3&lt;/P&gt;

&lt;P&gt;I am new to Splunk so please excuse my lack of knowledge on the different commands. But i feel like I might be missed a big concept in Splunk Search Language.&lt;/P&gt;

&lt;P&gt;Advance thanks for any help on this.&lt;/P&gt;

&lt;P&gt;-New Splunk Enthusiast&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 13:35:59 GMT</pubDate>
    <dc:creator>sasisudas</dc:creator>
    <dc:date>2020-09-29T13:35:59Z</dc:date>
    <item>
      <title>Correlating field values and finding where they match</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Correlating-field-values-and-finding-where-they-match/m-p/317861#M95105</link>
      <description>&lt;P&gt;Hello guys,&lt;/P&gt;

&lt;P&gt;So I have struggled writing search pipeline for this senario:&lt;/P&gt;

&lt;P&gt;I have comparing unique id(numerical value) in 3 different fields (id_1,id_2,id_3). The data looks something like:&lt;BR /&gt;
id_1 |   id_2 |  id_3&lt;BR /&gt;
1          3    4&lt;BR /&gt;
2          4    5&lt;BR /&gt;
3          5    6&lt;BR /&gt;
4         6     5 &lt;BR /&gt;
4         5   3 &lt;/P&gt;

&lt;P&gt;I want to find out where all three columns have a matching value.&lt;BR /&gt;
For example, here 4 would be a unique value that appears in all three fields.&lt;/P&gt;

&lt;P&gt;I have run different seaches:&lt;BR /&gt;
...|table id_1.id_2,id_3|where id_1==id_2==id_3&lt;BR /&gt;
...|eval matchname=id_2|where id_1==matchname   &amp;lt;-tried with 2 fields first, no result&lt;BR /&gt;
...|table id_1, id_2|eval matchname=if(id_1==id_2,"y","n")&lt;BR /&gt;
...|stats values(id_1) by id_2,id_3&lt;/P&gt;

&lt;P&gt;I am new to Splunk so please excuse my lack of knowledge on the different commands. But i feel like I might be missed a big concept in Splunk Search Language.&lt;/P&gt;

&lt;P&gt;Advance thanks for any help on this.&lt;/P&gt;

&lt;P&gt;-New Splunk Enthusiast&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:35:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Correlating-field-values-and-finding-where-they-match/m-p/317861#M95105</guid>
      <dc:creator>sasisudas</dc:creator>
      <dc:date>2020-09-29T13:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Correlating field values and finding where they match</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Correlating-field-values-and-finding-where-they-match/m-p/317862#M95106</link>
      <description>&lt;P&gt;This should do, starting from your initial table:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | table id_1 id_2 id_3 | eval foo = 42 | untable foo name value | stats dc(name) as dc by value | where dc=3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That will distinct-count the field names per value, and only keep those values that occur in all three field names.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 07:48:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Correlating-field-values-and-finding-where-they-match/m-p/317862#M95106</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2017-04-11T07:48:38Z</dc:date>
    </item>
  </channel>
</rss>

