<?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: Add trendline to timechart splunk in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Add-trendline-to-timechart-splunk/m-p/362122#M23605</link>
    <description>&lt;P&gt;@mayurr98 if I want a line in a column chart.. What can I do?? I tried changing the chart type but that average is in a bar shape not a line&lt;/P&gt;</description>
    <pubDate>Fri, 05 Jan 2018 11:22:32 GMT</pubDate>
    <dc:creator>karthi25</dc:creator>
    <dc:date>2018-01-05T11:22:32Z</dc:date>
    <item>
      <title>Add trendline to timechart splunk</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Add-trendline-to-timechart-splunk/m-p/362120#M23603</link>
      <description>&lt;P&gt;I am having the chart with durations, Now I want add a line over the chart with values as avg(duration). I used below query, but its not showing up trendline&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=cloudfoundry sourcetype=cloudfoundry_apps "cf_foundation=px-npe01" "cf_org_name=Commissions" "cf_space_name=development" "cf_app_name=splunk**   |search endDate !=null AND status='COMPLETED' |eval start_epoch=strptime(startDate,"%Y-%m-%d %H:%M:%S.%1N")
     |eval _time=start_epoch
     |eval end_epoch=strptime(endDate,"%Y-%m-%d %H:%M:%S.%1N")
     |eval duration=round((end_epoch-start_epoch)/3600)
      | chart values(duration) as duration by processLogId | trendline sma5(duration) as sma_Max_Resp
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My expectation will be as follows&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/4071i4A63CACF9AED3072/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 12:01:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Add-trendline-to-timechart-splunk/m-p/362120#M23603</guid>
      <dc:creator>karthi25</dc:creator>
      <dc:date>2018-01-04T12:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Add trendline to timechart splunk</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Add-trendline-to-timechart-splunk/m-p/362121#M23604</link>
      <description>&lt;P&gt;hey try this!&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=cloudfoundry sourcetype=cloudfoundry_apps "cf_foundation=px-npe01" "cf_org_name=Commissions" "cf_space_name=development" "cf_app_name=splunk**   
|search endDate !=null AND status='COMPLETED' |eval start_epoch=strptime(startDate,"%Y-%m-%d %H:%M:%S.%1N")
      |eval _time=start_epoch
      |eval end_epoch=strptime(endDate,"%Y-%m-%d %H:%M:%S.%1N")
      |eval duration=round((end_epoch-start_epoch)/3600)
       | chart values(duration) as duration by processLogId | eventstats avg(duration) as avg_duration
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;just add &lt;CODE&gt;eventstats avg(duration) as avg_duration&lt;/CODE&gt; at the end of your query instead of &lt;CODE&gt;trendline&lt;/CODE&gt; command.&lt;/P&gt;

&lt;P&gt;let me know if this helps you!&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 12:43:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Add-trendline-to-timechart-splunk/m-p/362121#M23604</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-04T12:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: Add trendline to timechart splunk</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Add-trendline-to-timechart-splunk/m-p/362122#M23605</link>
      <description>&lt;P&gt;@mayurr98 if I want a line in a column chart.. What can I do?? I tried changing the chart type but that average is in a bar shape not a line&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2018 11:22:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Add-trendline-to-timechart-splunk/m-p/362122#M23605</guid>
      <dc:creator>karthi25</dc:creator>
      <dc:date>2018-01-05T11:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: Add trendline to timechart splunk</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Add-trendline-to-timechart-splunk/m-p/362123#M23606</link>
      <description>&lt;P&gt;as per my knowledge, it will not create a line in column chart this solution is only meant for line chart!&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2018 11:39:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Add-trendline-to-timechart-splunk/m-p/362123#M23606</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-05T11:39:11Z</dc:date>
    </item>
  </channel>
</rss>

