<?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 Getting difference of two string values and calculating percentage in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Getting-difference-of-two-string-values-and-calculating/m-p/194861#M20120</link>
    <description>&lt;P&gt;There are two strings "abc" and "xyz", some values are assigned to the strings;&lt;BR /&gt;
suppose say&lt;BR /&gt;
abc: 50 and xyz: 45&lt;/P&gt;

&lt;P&gt;I want to write a quarry which yields a result like&lt;/P&gt;

&lt;P&gt;Result = (abc-xyz)&lt;BR /&gt;
and compare if result &amp;gt;= 75%&lt;/P&gt;

&lt;P&gt;Please help me in this.Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Fri, 03 Jan 2014 13:35:37 GMT</pubDate>
    <dc:creator>sowmya_kn</dc:creator>
    <dc:date>2014-01-03T13:35:37Z</dc:date>
    <item>
      <title>Getting difference of two string values and calculating percentage</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Getting-difference-of-two-string-values-and-calculating/m-p/194861#M20120</link>
      <description>&lt;P&gt;There are two strings "abc" and "xyz", some values are assigned to the strings;&lt;BR /&gt;
suppose say&lt;BR /&gt;
abc: 50 and xyz: 45&lt;/P&gt;

&lt;P&gt;I want to write a quarry which yields a result like&lt;/P&gt;

&lt;P&gt;Result = (abc-xyz)&lt;BR /&gt;
and compare if result &amp;gt;= 75%&lt;/P&gt;

&lt;P&gt;Please help me in this.Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jan 2014 13:35:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Getting-difference-of-two-string-values-and-calculating/m-p/194861#M20120</guid>
      <dc:creator>sowmya_kn</dc:creator>
      <dc:date>2014-01-03T13:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Getting difference of two string values and calculating percentage</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Getting-difference-of-two-string-values-and-calculating/m-p/194862#M20121</link>
      <description>&lt;P&gt;Your question is lacking a bit of information;&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;75% of what?&lt;/LI&gt;
&lt;LI&gt;Is &lt;CODE&gt;abc&lt;/CODE&gt; always larger than &lt;CODE&gt;xyz&lt;/CODE&gt;?&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Anyway, here are a few examples of some arithmetic operations, but you should look up these pages as well;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Eval"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Eval&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/CommonEvalFunctions"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/CommonEvalFunctions&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search here | eval diff = abc - xyz |



your search here | eval absdiff = abs(abc - xyz) |



your search here | eval ratio = xyz/abc |



your search here | eval ratio = xyz/abc | where ratio &amp;gt;=0.75
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;/K&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jan 2014 13:57:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Getting-difference-of-two-string-values-and-calculating/m-p/194862#M20121</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2014-01-03T13:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: Getting difference of two string values and calculating percentage</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Getting-difference-of-two-string-values-and-calculating/m-p/194863#M20122</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;75% of abc&lt;BR /&gt;
yes abc is always larger than xyz&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Fri, 03 Jan 2014 14:06:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Getting-difference-of-two-string-values-and-calculating/m-p/194863#M20122</guid>
      <dc:creator>sowmya_kn</dc:creator>
      <dc:date>2014-01-03T14:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: Getting difference of two string values and calculating percentage</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Getting-difference-of-two-string-values-and-calculating/m-p/194864#M20123</link>
      <description>&lt;P&gt;So the last of my examples should fit you nicely. Please upvote and/or mark the answer as accepted if your problem was solved.&lt;/P&gt;

&lt;P&gt;/K&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jan 2014 14:31:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Getting-difference-of-two-string-values-and-calculating/m-p/194864#M20123</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2014-01-03T14:31:31Z</dc:date>
    </item>
  </channel>
</rss>

