<?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 display timechart for certain time period without being affected by earliest? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-timechart-for-certain-time-period-without-being/m-p/593847#M206701</link>
    <description>&lt;P&gt;Hello &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/229101"&gt;@tshah-splunk&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you for providing the above. But its not working as its showing top results only for one trendline. I have eval with 5 conditions before the timechart and it displays results only for the first eval condition.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Apr 2022 19:50:56 GMT</pubDate>
    <dc:creator>ojtoids</dc:creator>
    <dc:date>2022-04-14T19:50:56Z</dc:date>
    <item>
      <title>How to display timechart for certain time period without being affected by earliest?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-timechart-for-certain-time-period-without-being/m-p/593806#M206689</link>
      <description>&lt;P&gt;Im using a search query to search for data in "all time" but want to display timechart only for last 60 days. If i try to use "&lt;SPAN&gt;earliest=-2mon" it shows the timechart for 2 months but also loses the data past 60 days which projects wrong data in timechart.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Current query looks like this&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=data "search criteria" earliest=-2mon | | timechart usenull=f span=1w count by datapoints&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2022 16:24:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-timechart-for-certain-time-period-without-being/m-p/593806#M206689</guid>
      <dc:creator>ojtoids</dc:creator>
      <dc:date>2022-04-14T16:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to display timechart for certain time period without being affected by earliest?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-timechart-for-certain-time-period-without-being/m-p/593830#M206694</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/244833"&gt;@ojtoids&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;You can use the head command to display the top 8 results. However, it would not be much optimistic approach. Also, when you use earliest in the search query itself, it doesn't matter how much time you select in the time range picker. The query will run for the time defined using the earliest command only. So, if you want to search for data using All time and still display the timechart for the last 2 months only, I would suggest using the head command. Your query should look like below:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=data "search criteria" earliest=-2mon | | timechart usenull=f span=1w count by datapoints
| head 8 ```Top 8 results```&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2022 16:38:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-timechart-for-certain-time-period-without-being/m-p/593830#M206694</guid>
      <dc:creator>tshah-splunk</dc:creator>
      <dc:date>2022-04-14T16:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to display timechart for certain time period without being affected by earliest?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-timechart-for-certain-time-period-without-being/m-p/593847#M206701</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/229101"&gt;@tshah-splunk&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you for providing the above. But its not working as its showing top results only for one trendline. I have eval with 5 conditions before the timechart and it displays results only for the first eval condition.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2022 19:50:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-timechart-for-certain-time-period-without-being/m-p/593847#M206701</guid>
      <dc:creator>ojtoids</dc:creator>
      <dc:date>2022-04-14T19:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to display timechart for certain time period without being affected by earliest?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-timechart-for-certain-time-period-without-being/m-p/593856#M206704</link>
      <description>&lt;P&gt;It's hard to help without more details to your search.&lt;/P&gt;&lt;P&gt;All I can say for now is that you're&amp;nbsp; using timechart count so you're just aggregating your data points by counting regardless of their value so the actual evals probably don't matter much. But it's hard to say anything past that.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Apr 2022 04:50:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-timechart-for-certain-time-period-without-being/m-p/593856#M206704</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-04-15T04:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to display timechart for certain time period without being affected by earliest?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-timechart-for-certain-time-period-without-being/m-p/593866#M206707</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=data "search criteria"
| timechart usenull=f span=1w count by datapoints
| where _time &amp;gt;= relative_time(now(),"-2mon")&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 15 Apr 2022 07:52:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-timechart-for-certain-time-period-without-being/m-p/593866#M206707</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-04-15T07:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to display timechart for certain time period without being affected by earliest?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-timechart-for-certain-time-period-without-being/m-p/593935#M206733</link>
      <description>&lt;P&gt;OK, maybe I fail to see the point here but how is searching across all time and only at the end limiting by _time better than setting earliest? Unless of course there's something strange done with time in the middle, but I assume it isn't. The search in the form of search all time | transform | limit by _time would be hella ineffective since splunk would do a lot of unnecessary calculations which it will in the end drop.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Apr 2022 19:49:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-timechart-for-certain-time-period-without-being/m-p/593935#M206733</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-04-15T19:49:30Z</dc:date>
    </item>
  </channel>
</rss>

