<?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: timechart calculated grouped value in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/timechart-calculated-grouped-value/m-p/39053#M8898</link>
    <description>&lt;P&gt;Timechart has to use a function and the result has to be numerical but the function could be for example "values(field)".&lt;/P&gt;

&lt;P&gt;In the above, conversion was a field name and not a function and I knew it only had one value so I used first as the function.&lt;/P&gt;</description>
    <pubDate>Thu, 05 Jan 2012 23:38:19 GMT</pubDate>
    <dc:creator>BobM</dc:creator>
    <dc:date>2012-01-05T23:38:19Z</dc:date>
    <item>
      <title>timechart calculated grouped value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-calculated-grouped-value/m-p/39050#M8895</link>
      <description>&lt;P&gt;I have a query in the form&lt;/P&gt;

&lt;P&gt;eventtype="search" | stats count as search_count by host | appendcols [search application=flights eventtype="pay_success" | stats count as buy_count by host] | eval conversion=(buy_count/search_count)*100 &lt;/P&gt;

&lt;P&gt;which works fine and gives me conversions per host,&lt;BR /&gt;
however, if I want to chart this over time replacing stats with timechart , it doesn't work the way I expect it to.&lt;/P&gt;

&lt;P&gt;Is there any way to timechart a calculated value grouped by another value?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:43:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-calculated-grouped-value/m-p/39050#M8895</guid>
      <dc:creator>ppediaditis</dc:creator>
      <dc:date>2020-09-28T09:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: timechart calculated grouped value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-calculated-grouped-value/m-p/39051#M8896</link>
      <description>&lt;P&gt;I think you could do this by using the bucket function and stats&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eventtype="search" | bucket _time span=1h | stats count as search_count by host _time | appendcols [search application=flights eventtype="pay_success" | bucket _time span=1h | stats count as buy_count by host _time ] | eval conversion=(buy_count/search_count)*100 | timechart first(conversion) by host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The bucket command groups data into hour blocks (you can change that to any period you wish) and then the stats now also groups by host and _time so it should now be possible to timechart. &lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2011 10:22:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-calculated-grouped-value/m-p/39051#M8896</guid>
      <dc:creator>BobM</dc:creator>
      <dc:date>2011-07-07T10:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: timechart calculated grouped value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-calculated-grouped-value/m-p/39052#M8897</link>
      <description>&lt;P&gt;Nice! However, it doesn't allow me to use timechart with something other than a function (in this case conversion), is there some other syntax I should use?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2011 10:42:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-calculated-grouped-value/m-p/39052#M8897</guid>
      <dc:creator>ppediaditis</dc:creator>
      <dc:date>2011-07-07T10:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: timechart calculated grouped value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-calculated-grouped-value/m-p/39053#M8898</link>
      <description>&lt;P&gt;Timechart has to use a function and the result has to be numerical but the function could be for example "values(field)".&lt;/P&gt;

&lt;P&gt;In the above, conversion was a field name and not a function and I knew it only had one value so I used first as the function.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2012 23:38:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-calculated-grouped-value/m-p/39053#M8898</guid>
      <dc:creator>BobM</dc:creator>
      <dc:date>2012-01-05T23:38:19Z</dc:date>
    </item>
  </channel>
</rss>

