<?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 could I chart ratio of counts of field values? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-could-I-chart-ratio-of-counts-of-field-values/m-p/379041#M111088</link>
    <description>&lt;P&gt;Hi, suppose my events contain this field with two possible values:&lt;/P&gt;

&lt;P&gt;Ok=True or&lt;BR /&gt;
Ok=False&lt;/P&gt;

&lt;P&gt;Every hour, I'll have a certain number ('TTT') of True values and a certain number ('FFF') of False values.&lt;/P&gt;

&lt;P&gt;I want to create a chart that shows the failure rate (FFF/(TTT+FFF)) for any given time bucket size. &lt;/P&gt;

&lt;P&gt;Is that possible please? &lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Mon, 11 Feb 2019 22:38:22 GMT</pubDate>
    <dc:creator>jchowdown</dc:creator>
    <dc:date>2019-02-11T22:38:22Z</dc:date>
    <item>
      <title>How could I chart ratio of counts of field values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-could-I-chart-ratio-of-counts-of-field-values/m-p/379041#M111088</link>
      <description>&lt;P&gt;Hi, suppose my events contain this field with two possible values:&lt;/P&gt;

&lt;P&gt;Ok=True or&lt;BR /&gt;
Ok=False&lt;/P&gt;

&lt;P&gt;Every hour, I'll have a certain number ('TTT') of True values and a certain number ('FFF') of False values.&lt;/P&gt;

&lt;P&gt;I want to create a chart that shows the failure rate (FFF/(TTT+FFF)) for any given time bucket size. &lt;/P&gt;

&lt;P&gt;Is that possible please? &lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2019 22:38:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-could-I-chart-ratio-of-counts-of-field-values/m-p/379041#M111088</guid>
      <dc:creator>jchowdown</dc:creator>
      <dc:date>2019-02-11T22:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: How could I chart ratio of counts of field values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-could-I-chart-ratio-of-counts-of-field-values/m-p/379042#M111089</link>
      <description>&lt;P&gt;Yep. Do this &lt;CODE&gt;|eval rate = (FFF/(TTT+FFF)) | timechart span=1h avg(rate) as rate&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;You can set span to whatever you want.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2019 23:44:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-could-I-chart-ratio-of-counts-of-field-values/m-p/379042#M111089</guid>
      <dc:creator>chrisyounger</dc:creator>
      <dc:date>2019-02-11T23:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: How could I chart ratio of counts of field values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-could-I-chart-ratio-of-counts-of-field-values/m-p/379043#M111090</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=YouShouldAlwaysSpecifyAnIndex AND sourcetype=AndSourcetypeToo
| bin _time span=1h
| chart count BY _time Ok
| eval pct=100*False/(False+True)
| timechart span=1h first(pct) AS pct
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Feb 2019 08:03:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-could-I-chart-ratio-of-counts-of-field-values/m-p/379043#M111090</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-02-12T08:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: How could I chart ratio of counts of field values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-could-I-chart-ratio-of-counts-of-field-values/m-p/379044#M111091</link>
      <description>&lt;P&gt;Sorry, I'm still a noob when it comes to splunk, but how would I actually obtain the queries for FFF and TTT?&lt;BR /&gt;
I tried various combinations of this (and the answer below) but nothing gets charted&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2019 21:25:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-could-I-chart-ratio-of-counts-of-field-values/m-p/379044#M111091</guid>
      <dc:creator>jchowdown</dc:creator>
      <dc:date>2019-02-12T21:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: How could I chart ratio of counts of field values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-could-I-chart-ratio-of-counts-of-field-values/m-p/379045#M111092</link>
      <description>&lt;P&gt;I had a mistake and edited my answer to fix it.  Try again.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 01:00:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-could-I-chart-ratio-of-counts-of-field-values/m-p/379045#M111092</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-02-13T01:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: How could I chart ratio of counts of field values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-could-I-chart-ratio-of-counts-of-field-values/m-p/379046#M111093</link>
      <description>&lt;P&gt;This is perfect, thanks! Works like a charm!&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 21:24:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-could-I-chart-ratio-of-counts-of-field-values/m-p/379046#M111093</guid>
      <dc:creator>jchowdown</dc:creator>
      <dc:date>2019-02-13T21:24:04Z</dc:date>
    </item>
  </channel>
</rss>

