<?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 Comparing two fields from different sources, eval and subsearch? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Comparing-two-fields-from-different-sources-eval-and-subsearch/m-p/39445#M9002</link>
    <description>&lt;P&gt;Hello all, brand new to Splunk so please bare with me.&lt;/P&gt;

&lt;P&gt;I have two csv files as two different sources with the same type of data in each. It looks like the following:&lt;/P&gt;

&lt;P&gt;Source1column1&lt;BR /&gt;&lt;BR /&gt;
2000&lt;BR /&gt;&lt;BR /&gt;
1000&lt;BR /&gt;&lt;BR /&gt;
4000&lt;BR /&gt;&lt;BR /&gt;
9000&lt;BR /&gt;&lt;BR /&gt;
...&lt;/P&gt;

&lt;P&gt;Source2column1&lt;BR /&gt;&lt;BR /&gt;
1400&lt;BR /&gt;&lt;BR /&gt;
1300&lt;BR /&gt;&lt;BR /&gt;
3000&lt;BR /&gt;&lt;BR /&gt;
8000&lt;BR /&gt;&lt;BR /&gt;
...  &lt;/P&gt;

&lt;P&gt;I want to be able to compare the first value in Source1column1 "2000" and return how many instances "2000" is greater than all of the numbers in Source2column1. In this case it should return the value of 2. The end result should be a table showing Source1 data and a count of the instances.  Then I'm assuming I can perform eval statements on the results from there..&lt;/P&gt;

&lt;P&gt;Data Instances&lt;BR /&gt;&lt;BR /&gt;
2000 2&lt;BR /&gt;&lt;BR /&gt;
1000 0&lt;BR /&gt;&lt;BR /&gt;
4000 3&lt;BR /&gt;&lt;BR /&gt;
9000 4  &lt;/P&gt;

&lt;P&gt;Anyhow, in excel I can do this in 5 seconds using if statements and array formulas but I would like to implement the same functionality in Splunk and am just having a hard time getting started with the syntax of comparing two sources and their fields.. Any help is appreciated!&lt;/P&gt;</description>
    <pubDate>Thu, 22 Dec 2011 14:38:02 GMT</pubDate>
    <dc:creator>Moogz</dc:creator>
    <dc:date>2011-12-22T14:38:02Z</dc:date>
    <item>
      <title>Comparing two fields from different sources, eval and subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparing-two-fields-from-different-sources-eval-and-subsearch/m-p/39445#M9002</link>
      <description>&lt;P&gt;Hello all, brand new to Splunk so please bare with me.&lt;/P&gt;

&lt;P&gt;I have two csv files as two different sources with the same type of data in each. It looks like the following:&lt;/P&gt;

&lt;P&gt;Source1column1&lt;BR /&gt;&lt;BR /&gt;
2000&lt;BR /&gt;&lt;BR /&gt;
1000&lt;BR /&gt;&lt;BR /&gt;
4000&lt;BR /&gt;&lt;BR /&gt;
9000&lt;BR /&gt;&lt;BR /&gt;
...&lt;/P&gt;

&lt;P&gt;Source2column1&lt;BR /&gt;&lt;BR /&gt;
1400&lt;BR /&gt;&lt;BR /&gt;
1300&lt;BR /&gt;&lt;BR /&gt;
3000&lt;BR /&gt;&lt;BR /&gt;
8000&lt;BR /&gt;&lt;BR /&gt;
...  &lt;/P&gt;

&lt;P&gt;I want to be able to compare the first value in Source1column1 "2000" and return how many instances "2000" is greater than all of the numbers in Source2column1. In this case it should return the value of 2. The end result should be a table showing Source1 data and a count of the instances.  Then I'm assuming I can perform eval statements on the results from there..&lt;/P&gt;

&lt;P&gt;Data Instances&lt;BR /&gt;&lt;BR /&gt;
2000 2&lt;BR /&gt;&lt;BR /&gt;
1000 0&lt;BR /&gt;&lt;BR /&gt;
4000 3&lt;BR /&gt;&lt;BR /&gt;
9000 4  &lt;/P&gt;

&lt;P&gt;Anyhow, in excel I can do this in 5 seconds using if statements and array formulas but I would like to implement the same functionality in Splunk and am just having a hard time getting started with the syntax of comparing two sources and their fields.. Any help is appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2011 14:38:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparing-two-fields-from-different-sources-eval-and-subsearch/m-p/39445#M9002</guid>
      <dc:creator>Moogz</dc:creator>
      <dc:date>2011-12-22T14:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two fields from different sources, eval and subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparing-two-fields-from-different-sources-eval-and-subsearch/m-p/39446#M9003</link>
      <description>&lt;P&gt;I think this might require subsearching, but I would be intrigued to see if someone can come up with a more elegant solution than subsearching.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Jan 2012 17:28:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparing-two-fields-from-different-sources-eval-and-subsearch/m-p/39446#M9003</guid>
      <dc:creator>nate015</dc:creator>
      <dc:date>2012-01-08T17:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two fields from different sources, eval and subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparing-two-fields-from-different-sources-eval-and-subsearch/m-p/39447#M9004</link>
      <description>&lt;P&gt;I wouldn't mind using a subsearch to start.. but i could use a good example to help get things going, anyone?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2012 20:14:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparing-two-fields-from-different-sources-eval-and-subsearch/m-p/39447#M9004</guid>
      <dc:creator>Moogz</dc:creator>
      <dc:date>2012-01-17T20:14:41Z</dc:date>
    </item>
  </channel>
</rss>

