<?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: Mathematic manipulation on 2 separate seraches in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Mathematic-manipulation-on-2-separate-seraches/m-p/198019#M187409</link>
    <description>&lt;P&gt;Maybe it will perform better with just one search, like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(source="xxxx" sourcetype="xxx" eventType="xxx" clientVersion="x.x.x") OR (source="yyyy" sourcetype="yyy" eventType="yyy" clientVersion="y.y.y") | stats count(eval(if(clientVersion="x.x.x",1,null))) as A, count(eval(if(clientVersion="y.y.y",1,null))) as B | eval Results = A/B
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Regards&lt;/P&gt;</description>
    <pubDate>Wed, 08 Jan 2014 08:12:13 GMT</pubDate>
    <dc:creator>gfuente</dc:creator>
    <dc:date>2014-01-08T08:12:13Z</dc:date>
    <item>
      <title>Mathematic manipulation on 2 separate seraches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Mathematic-manipulation-on-2-separate-seraches/m-p/198017#M187407</link>
      <description>&lt;P&gt;I want to perform mathematic manipulations on 2 unrelated search results.&lt;/P&gt;

&lt;P&gt;i.e. I want to take a result like:&lt;BR /&gt;
source="xxxx" sourcetype="xxx" eventType="xxx" clientVersion="x.x.x" | stats count as A&lt;/P&gt;

&lt;P&gt;and divide it by a completely new search result:&lt;BR /&gt;
source="yyyy" sourcetype="yyy" eventType="yyy" clientVersion="y.y.y" | stats count as B&lt;/P&gt;

&lt;P&gt;A/B&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2014 07:54:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Mathematic-manipulation-on-2-separate-seraches/m-p/198017#M187407</guid>
      <dc:creator>ramic</dc:creator>
      <dc:date>2014-01-08T07:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: Mathematic manipulation on 2 separate seraches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Mathematic-manipulation-on-2-separate-seraches/m-p/198018#M187408</link>
      <description>&lt;P&gt;You can use multisearch for this&lt;/P&gt;

&lt;P&gt;| multisearch [search index=a sourcetype="a" | eval type="A"] [search index=b sourcetype=b | eval type="B"] &lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2014 08:05:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Mathematic-manipulation-on-2-separate-seraches/m-p/198018#M187408</guid>
      <dc:creator>ddarmand</dc:creator>
      <dc:date>2014-01-08T08:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: Mathematic manipulation on 2 separate seraches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Mathematic-manipulation-on-2-separate-seraches/m-p/198019#M187409</link>
      <description>&lt;P&gt;Maybe it will perform better with just one search, like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(source="xxxx" sourcetype="xxx" eventType="xxx" clientVersion="x.x.x") OR (source="yyyy" sourcetype="yyy" eventType="yyy" clientVersion="y.y.y") | stats count(eval(if(clientVersion="x.x.x",1,null))) as A, count(eval(if(clientVersion="y.y.y",1,null))) as B | eval Results = A/B
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2014 08:12:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Mathematic-manipulation-on-2-separate-seraches/m-p/198019#M187409</guid>
      <dc:creator>gfuente</dc:creator>
      <dc:date>2014-01-08T08:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: Mathematic manipulation on 2 separate seraches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Mathematic-manipulation-on-2-separate-seraches/m-p/198020#M187410</link>
      <description>&lt;P&gt;It works but parenthesis are wrong &lt;/P&gt;

&lt;P&gt;(source="xxxx" sourcetype="xxx" eventType="xxx" clientVersion="x.x.x") OR (source="yyyy" sourcetype="yyy" eventType="yyy" clientVersion="y.y.y") | stats count(eval(if(clientVersion="x.x.x",1,null))) as A, count(eval(if(clientVersion="y.y.y",1,null))) as B | eval Results = A/B&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2014 08:27:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Mathematic-manipulation-on-2-separate-seraches/m-p/198020#M187410</guid>
      <dc:creator>ddarmand</dc:creator>
      <dc:date>2014-01-08T08:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: Mathematic manipulation on 2 separate seraches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Mathematic-manipulation-on-2-separate-seraches/m-p/198021#M187411</link>
      <description>&lt;P&gt;You are right&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2014 08:31:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Mathematic-manipulation-on-2-separate-seraches/m-p/198021#M187411</guid>
      <dc:creator>gfuente</dc:creator>
      <dc:date>2014-01-08T08:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: Mathematic manipulation on 2 separate seraches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Mathematic-manipulation-on-2-separate-seraches/m-p/198022#M187412</link>
      <description>&lt;P&gt;Thank you both, this works.&lt;BR /&gt;
Still haven't figured how to manipulate multisearch results, used single search instead.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2014 09:20:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Mathematic-manipulation-on-2-separate-seraches/m-p/198022#M187412</guid>
      <dc:creator>ramic</dc:creator>
      <dc:date>2014-01-08T09:20:22Z</dc:date>
    </item>
  </channel>
</rss>

