<?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 do I perform math against two searches? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-math-against-two-searches/m-p/439754#M167678</link>
    <description>&lt;P&gt;I have two searches that use the same index and each return a numerical total, differing only in the period of time of the data they look at. How would I perform math on the search results for example adding or calculating percentages? &lt;/P&gt;</description>
    <pubDate>Thu, 30 Aug 2018 14:01:12 GMT</pubDate>
    <dc:creator>mo86</dc:creator>
    <dc:date>2018-08-30T14:01:12Z</dc:date>
    <item>
      <title>How do I perform math against two searches?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-math-against-two-searches/m-p/439754#M167678</link>
      <description>&lt;P&gt;I have two searches that use the same index and each return a numerical total, differing only in the period of time of the data they look at. How would I perform math on the search results for example adding or calculating percentages? &lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 14:01:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-math-against-two-searches/m-p/439754#M167678</guid>
      <dc:creator>mo86</dc:creator>
      <dc:date>2018-08-30T14:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I perform math against two searches?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-math-against-two-searches/m-p/439755#M167679</link>
      <description>&lt;P&gt;maybe, could you write the 2 queries please.. &lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 14:54:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-math-against-two-searches/m-p/439755#M167679</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2018-08-30T14:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do I perform math against two searches?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-math-against-two-searches/m-p/439756#M167680</link>
      <description>&lt;P&gt;index=data NOT ID="&lt;EM&gt;"  earliest=-1d@d latest=-0d@d | regex name!="[a-z].&lt;/EM&gt;"| dedup id | stats count&lt;/P&gt;

&lt;P&gt;index=data NOT ID="&lt;EM&gt;" earliest=-0d@d latest=now | regex name!="[a-z].&lt;/EM&gt;"| dedup id | stats count&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 14:57:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-math-against-two-searches/m-p/439756#M167680</guid>
      <dc:creator>mo86</dc:creator>
      <dc:date>2018-08-30T14:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do I perform math against two searches?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-math-against-two-searches/m-p/439757#M167681</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults
| fields - _time
| eval Total1=[search index=data NOT ID="" earliest=-1d@d latest=-0d@d | regex name!="[a-z]."| dedup id | stats count | return $count] 
| eval Total2=[search index=data NOT ID="" earliest=-0d@d latest=now | regex name!="[a-z]."| dedup id | stats count | return $count]
| eval FullTotal=Total1+Total2 | eval percentage=((Total1/FullTotal)*100)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Aug 2018 15:12:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-math-against-two-searches/m-p/439757#M167681</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2018-08-30T15:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do I perform math against two searches?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-math-against-two-searches/m-p/439758#M167682</link>
      <description>&lt;P&gt;Thank you, that works great!&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 15:25:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-math-against-two-searches/m-p/439758#M167682</guid>
      <dc:creator>mo86</dc:creator>
      <dc:date>2018-08-30T15:25:33Z</dc:date>
    </item>
  </channel>
</rss>

