<?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: How to create a rate on a timechart with two measures? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-rate-on-a-timechart-with-two-measures/m-p/387512#M113029</link>
    <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_* component IN("Metrics", "PerProcess")
|  eval component=if(component=="Metrics", "released", "cancelled")
| rename component as orderLineState

| rename COMMENT AS "everything above generates sample events; everything below is your solution"

| timechart  count max(date_hour) AS m_node BY orderLineState
| eval cancelRate=round(('count: cancelled' / ('count: cancelled' + 'count: released')) * 100, 2)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 13 Jul 2019 21:53:30 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2019-07-13T21:53:30Z</dc:date>
    <item>
      <title>How to create a rate on a timechart with two measures?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-rate-on-a-timechart-with-two-measures/m-p/387510#M113027</link>
      <description>&lt;P&gt;Works just fine&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| timechart  count  by orderLineState
| eval cancelRate=round((cancelled/(cancelled+released))*100,2)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But when I add a second measure in the time chart I can't figure out how to get values I need back out for the cancelRate&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| timechart max(node) as m_node count  by orderLineState
| eval cancelRate=round((cancelled/(cancelled+released))*100,2)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 13 Jul 2019 18:47:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-rate-on-a-timechart-with-two-measures/m-p/387510#M113027</guid>
      <dc:creator>taynord</dc:creator>
      <dc:date>2019-07-13T18:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a rate on a timechart with two measures?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-rate-on-a-timechart-with-two-measures/m-p/387511#M113028</link>
      <description>&lt;P&gt;Pay attention to the field names produced by the timechart, likely &lt;CODE&gt;count: cancelled&lt;/CODE&gt; etc.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval cancelRate = round(('count: cancelled' / ('count: cancelled' + 'count: released')) * 100, 2)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 13 Jul 2019 20:22:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-rate-on-a-timechart-with-two-measures/m-p/387511#M113028</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2019-07-13T20:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a rate on a timechart with two measures?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-rate-on-a-timechart-with-two-measures/m-p/387512#M113029</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_* component IN("Metrics", "PerProcess")
|  eval component=if(component=="Metrics", "released", "cancelled")
| rename component as orderLineState

| rename COMMENT AS "everything above generates sample events; everything below is your solution"

| timechart  count max(date_hour) AS m_node BY orderLineState
| eval cancelRate=round(('count: cancelled' / ('count: cancelled' + 'count: released')) * 100, 2)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 13 Jul 2019 21:53:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-rate-on-a-timechart-with-two-measures/m-p/387512#M113029</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-07-13T21:53:30Z</dc:date>
    </item>
  </channel>
</rss>

