<?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 Displaying calculated value in timechart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Displaying-calculated-value-in-timechart/m-p/180833#M52105</link>
    <description>&lt;P&gt;My search sting is like:&lt;/P&gt;

&lt;P&gt;host=A|rename  "ERC" TO EMPLOYERCODE|join EMPLOYERCODE [search host= B|rename EMPLOYER_CODE TO EMPLOYERCODE ]|timechart span=1d sum(Visits) AS Visit, count(USER_NAME) AS User by EMPLOYERCODE| eval avg=Visit/User|table  _time,avg.&lt;/P&gt;

&lt;P&gt;My purpose is to generate a timechart with avg in y axis.&lt;BR /&gt;
I am unable to display the avg in timechart. I am getting blank in average when using the above.Can you help me.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 16:05:15 GMT</pubDate>
    <dc:creator>jimjohn</dc:creator>
    <dc:date>2020-09-28T16:05:15Z</dc:date>
    <item>
      <title>Displaying calculated value in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Displaying-calculated-value-in-timechart/m-p/180833#M52105</link>
      <description>&lt;P&gt;My search sting is like:&lt;/P&gt;

&lt;P&gt;host=A|rename  "ERC" TO EMPLOYERCODE|join EMPLOYERCODE [search host= B|rename EMPLOYER_CODE TO EMPLOYERCODE ]|timechart span=1d sum(Visits) AS Visit, count(USER_NAME) AS User by EMPLOYERCODE| eval avg=Visit/User|table  _time,avg.&lt;/P&gt;

&lt;P&gt;My purpose is to generate a timechart with avg in y axis.&lt;BR /&gt;
I am unable to display the avg in timechart. I am getting blank in average when using the above.Can you help me.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:05:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Displaying-calculated-value-in-timechart/m-p/180833#M52105</guid>
      <dc:creator>jimjohn</dc:creator>
      <dc:date>2020-09-28T16:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying calculated value in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Displaying-calculated-value-in-timechart/m-p/180834#M52106</link>
      <description>&lt;P&gt;The &lt;CODE&gt;table&lt;/CODE&gt; call at the end is weird. Let's convert this to a simple, run-anywhere example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal | timechart bins=20 sum(bytes) as Visit count(user) as User | eval avg = Visit/User | fields - Visit User
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This works for me, fills the column &lt;CODE&gt;avg&lt;/CODE&gt; and removes the other two columns.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2014 08:12:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Displaying-calculated-value-in-timechart/m-p/180834#M52106</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-03-11T08:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying calculated value in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Displaying-calculated-value-in-timechart/m-p/180835#M52107</link>
      <description>&lt;P&gt;The solution woks fine if we doesn't use by EMPLOYERCODE.&lt;BR /&gt;
I need the result of sum and visits grouped by EMPLOYERCODE.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2014 09:09:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Displaying-calculated-value-in-timechart/m-p/180835#M52107</guid>
      <dc:creator>jimjohn</dc:creator>
      <dc:date>2014-03-11T09:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying calculated value in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Displaying-calculated-value-in-timechart/m-p/180836#M52108</link>
      <description>&lt;P&gt;Ah, I missed that. In that case you don't have fields called avg and User but rather (I guess) &lt;CODE&gt;some_employer: avg&lt;/CODE&gt; and &lt;CODE&gt;some_employer: User&lt;/CODE&gt;. If that's the case, foreach is your friend - exact syntax depends on what fieldnames you have after the timechart.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2014 10:16:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Displaying-calculated-value-in-timechart/m-p/180836#M52108</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-03-11T10:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying calculated value in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Displaying-calculated-value-in-timechart/m-p/180837#M52109</link>
      <description>&lt;P&gt;Thanks ,Let me try for each.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2014 12:28:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Displaying-calculated-value-in-timechart/m-p/180837#M52109</guid>
      <dc:creator>jimjohn</dc:creator>
      <dc:date>2014-03-11T12:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying calculated value in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Displaying-calculated-value-in-timechart/m-p/180838#M52110</link>
      <description>&lt;P&gt;foreach solved my problem.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2014 09:34:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Displaying-calculated-value-in-timechart/m-p/180838#M52110</guid>
      <dc:creator>jimjohn</dc:creator>
      <dc:date>2014-03-12T09:34:06Z</dc:date>
    </item>
  </channel>
</rss>

