<?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: Calculation based on field matching counts of a value in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Calculation-based-on-field-matching-counts-of-a-value/m-p/54327#M179730</link>
    <description>&lt;P&gt;Right what I was looking for &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;

&lt;P&gt;Thanks Hiroshi&lt;/P&gt;</description>
    <pubDate>Wed, 04 Sep 2013 10:35:36 GMT</pubDate>
    <dc:creator>prabhu_kar</dc:creator>
    <dc:date>2013-09-04T10:35:36Z</dc:date>
    <item>
      <title>Calculation based on field matching counts of a value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculation-based-on-field-matching-counts-of-a-value/m-p/54323#M179726</link>
      <description>&lt;P&gt;We have a CSV fields set defined (shortening it here), &lt;/P&gt;

&lt;P&gt;Txn,Destination,Status&lt;BR /&gt;&lt;BR /&gt;
test1,NY,Pass&lt;BR /&gt;&lt;BR /&gt;
test2,NY,Pass&lt;BR /&gt;&lt;BR /&gt;
test2,NY,Pass&lt;BR /&gt;&lt;BR /&gt;
test2,NY,Pass&lt;BR /&gt;&lt;BR /&gt;
test2,NY,Fail&lt;BR /&gt;&lt;BR /&gt;
test1,NY,Pass&lt;BR /&gt;&lt;BR /&gt;
test2,NY,Pass&lt;BR /&gt;&lt;BR /&gt;
test1,NY,Fail&lt;BR /&gt;&lt;BR /&gt;
test2,NY,Fail  &lt;/P&gt;

&lt;P&gt;Destinations vary as well (taking a simpler case) &lt;/P&gt;

&lt;P&gt;Trying to get something very simple then will group by Destination later on &lt;/P&gt;

&lt;TABLE border="1"&gt;
  &lt;TBODY&gt;&lt;TR&gt;
     &lt;TH&gt;TXN&lt;/TH&gt;
     &lt;TH&gt;SUCCESS&lt;/TH&gt;
     &lt;TH&gt;FAILURE RATE&lt;/TH&gt;
   &lt;/TR&gt;
  &lt;TR&gt;
      &lt;TD&gt;test1&lt;/TD&gt;
      &lt;TD&gt;count(Status=Pass)&lt;/TD&gt;
      &lt;TD&gt;count(Status=Fail)/( count(Status=Pass)+count(Status=Fail))&lt;/TD&gt;
   &lt;/TR&gt;
&lt;/TBODY&gt;&lt;/TABLE&gt;

&lt;P&gt;Iam trying stuff but somehow i cant find a way to search in one search two different count values.. not sure if iam trying to do anything complex here &lt;/P&gt;

&lt;P&gt;thanks&lt;BR /&gt;&lt;BR /&gt;
Prabhu&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2013 04:37:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculation-based-on-field-matching-counts-of-a-value/m-p/54323#M179726</guid>
      <dc:creator>prabhu_kar</dc:creator>
      <dc:date>2013-09-04T04:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation based on field matching counts of a value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculation-based-on-field-matching-counts-of-a-value/m-p/54324#M179727</link>
      <description>&lt;P&gt;How is such a feeling?&lt;/P&gt;

&lt;P&gt;････|stats count as All,count(eval(Status="Pass")) as SUCCESS,count(eval(Status="Fail")) as Fail by Txn|eval "FAILURE RATE"=Fail / All | table Txn,SUCCESS,"FAILURE RATE"&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2013 06:18:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculation-based-on-field-matching-counts-of-a-value/m-p/54324#M179727</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2013-09-04T06:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation based on field matching counts of a value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculation-based-on-field-matching-counts-of-a-value/m-p/54325#M179728</link>
      <description>&lt;P&gt;Hi prabhu_kar&lt;/P&gt;

&lt;P&gt;if i get you correct, you can use the following sample to get a &lt;CODE&gt;count&lt;/CODE&gt; of certain Status field values:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | stats count(eval(Status=Pass)) as PassCount by Destination
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;the &lt;CODE&gt;PassCount&lt;/CODE&gt; is a new field, which is needed and can be used further.&lt;/P&gt;

&lt;P&gt;hope this is some kind of helpful &lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2013 06:24:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculation-based-on-field-matching-counts-of-a-value/m-p/54325#M179728</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2013-09-04T06:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation based on field matching counts of a value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculation-based-on-field-matching-counts-of-a-value/m-p/54326#M179729</link>
      <description>&lt;P&gt;dammit, you beat me on that - need to index more coffee &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2013 06:27:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculation-based-on-field-matching-counts-of-a-value/m-p/54326#M179729</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2013-09-04T06:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation based on field matching counts of a value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculation-based-on-field-matching-counts-of-a-value/m-p/54327#M179730</link>
      <description>&lt;P&gt;Right what I was looking for &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;

&lt;P&gt;Thanks Hiroshi&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2013 10:35:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculation-based-on-field-matching-counts-of-a-value/m-p/54327#M179730</guid>
      <dc:creator>prabhu_kar</dc:creator>
      <dc:date>2013-09-04T10:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation based on field matching counts of a value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculation-based-on-field-matching-counts-of-a-value/m-p/54328#M179731</link>
      <description>&lt;P&gt;Thanks MuS &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2013 10:35:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculation-based-on-field-matching-counts-of-a-value/m-p/54328#M179731</guid>
      <dc:creator>prabhu_kar</dc:creator>
      <dc:date>2013-09-04T10:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation based on field matching counts of a value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculation-based-on-field-matching-counts-of-a-value/m-p/54329#M179732</link>
      <description>&lt;P&gt;Just wondering if&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|top limit=0 Status by Destination
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;doesn't do what you want?&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.0/SearchReference/Top"&gt;top documentation&lt;/A&gt; for the options and the usage for top.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Dec 2014 16:49:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculation-based-on-field-matching-counts-of-a-value/m-p/54329#M179732</guid>
      <dc:creator>landen99</dc:creator>
      <dc:date>2014-12-01T16:49:04Z</dc:date>
    </item>
  </channel>
</rss>

