<?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: Restricting timechart to smaller set of days than search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Restricting-timechart-to-smaller-set-of-days-than-search/m-p/678023#M231874</link>
    <description>&lt;P&gt;Also note that you don't need bin + timechart as you can simply do&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| timechart span=1d...&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 19 Feb 2024 23:12:36 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2024-02-19T23:12:36Z</dc:date>
    <item>
      <title>Restricting timechart to smaller set of days than search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Restricting-timechart-to-smaller-set-of-days-than-search/m-p/678003#M231861</link>
      <description>&lt;P&gt;I have a timechart that shows the last 30d and with the timechart I also have a trendline showing the sma7.&amp;nbsp; The problem is that on the timechart, the trendline doesn't show anything for days 1-6, which I understand is because there is no data from the previous days for the sma7 to calculate.&lt;/P&gt;&lt;P&gt;I thought that the solution could be to change my search for the last 37d and then only timechart days 7-37d (if that makes sense) but can't seem to figure out how to implement that or if that is even a possible solution.&lt;/P&gt;&lt;P&gt;Existing search&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=palo eventtype=user_logon earliest=-37d@d
| bin span=1d _time
| timechart count(eval(like(user_auth, "%-Compliant"))) as compliant  count as total 
| eval compliant=round(((compliant/total)*100),2)
| trendline sma7(compliant) as compliant7sma
| eval compliant7sma=round(compliant7sma,2)
| table _time, compliant, compliant7sma&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="graph.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/29406iAECF13EC5F46A84B/image-size/large?v=v2&amp;amp;px=999" role="button" title="graph.png" alt="graph.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2024 21:02:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Restricting-timechart-to-smaller-set-of-days-than-search/m-p/678003#M231861</guid>
      <dc:creator>DEADBEEF</dc:creator>
      <dc:date>2024-02-19T21:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: Restricting timechart to smaller set of days than search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Restricting-timechart-to-smaller-set-of-days-than-search/m-p/678022#M231873</link>
      <description>&lt;P&gt;Not sure if this is what you're trying to do, but you can always 'remove' the dates you don't want with a where clause&lt;/P&gt;&lt;P&gt;If compliant7sma field does not exist for the first 6 days, then just add&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where isnotnull(compliant7sma)&lt;/LI-CODE&gt;&lt;P&gt;at the end, or to do it on a time based filter&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where _time&amp;gt;=relative_time(now(), "-30d@d")&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 19 Feb 2024 23:11:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Restricting-timechart-to-smaller-set-of-days-than-search/m-p/678022#M231873</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2024-02-19T23:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: Restricting timechart to smaller set of days than search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Restricting-timechart-to-smaller-set-of-days-than-search/m-p/678023#M231874</link>
      <description>&lt;P&gt;Also note that you don't need bin + timechart as you can simply do&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| timechart span=1d...&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 19 Feb 2024 23:12:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Restricting-timechart-to-smaller-set-of-days-than-search/m-p/678023#M231874</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2024-02-19T23:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Restricting timechart to smaller set of days than search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Restricting-timechart-to-smaller-set-of-days-than-search/m-p/678024#M231875</link>
      <description>&lt;P&gt;Yes, I was looking for that where statement.&amp;nbsp; My mistake, I tried using |search which didn't work.&amp;nbsp; Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2024 23:19:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Restricting-timechart-to-smaller-set-of-days-than-search/m-p/678024#M231875</guid>
      <dc:creator>DEADBEEF</dc:creator>
      <dc:date>2024-02-19T23:19:44Z</dc:date>
    </item>
  </channel>
</rss>

