<?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: Using time range picker does not work in dashboard where report searches are used. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-time-range-picker-does-not-work-in-dashboard-where-report/m-p/148258#M41469</link>
    <description>&lt;P&gt;There's some great information here.&lt;/P&gt;

&lt;P&gt;Specific to the request here around being able to include a report on your dashboard, and use the time range from the dashboard picker rather than the report's time range, here is how you do it.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Test Report Time Range&amp;lt;/label&amp;gt;

  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="time" token="time"&amp;gt;
      &amp;lt;label&amp;gt;&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;
        &amp;lt;earliest&amp;gt;-60m@m&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
      &amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;

  &amp;lt;!-- Includes reference report, which by default, will use the time range defined in the report object --&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;title&amp;gt;Reference Report using Report Time Range&amp;lt;/title&amp;gt;

        &amp;lt;search ref="Top_Sourcetypes_Last_4_Hours"&amp;gt;&amp;lt;/search&amp;gt;

      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;

  &amp;lt;!-- Include reference report, but override the time range with the earliest/latest values set in the time picker above --&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;title&amp;gt;Reference Report using Dashboard Picker Time Range&amp;lt;/title&amp;gt;

        &amp;lt;search ref="Top_Sourcetypes_Last_4_Hours"&amp;gt;
          &amp;lt;earliest&amp;gt;$time.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$time.latest$&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;

      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;

&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 04 Aug 2015 18:54:14 GMT</pubDate>
    <dc:creator>nfilippi_splunk</dc:creator>
    <dc:date>2015-08-04T18:54:14Z</dc:date>
    <item>
      <title>Using time range picker does not work in dashboard where report searches are used.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-time-range-picker-does-not-work-in-dashboard-where-report/m-p/148254#M41465</link>
      <description>&lt;P&gt;I have a dashboard where we have a reference to a report in a search. In the report we have values for all time ranges. In dashboard, I want to provide a time range picker box so we can see only a few records and graph depending upon the selected time range. &lt;/P&gt;

&lt;P&gt;Even if I select a time range, its not working. Can someone suggest me how can I use it ?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2015 14:07:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-time-range-picker-does-not-work-in-dashboard-where-report/m-p/148254#M41465</guid>
      <dc:creator>praspai</dc:creator>
      <dc:date>2015-07-30T14:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using time range picker does not work in dashboard where report searches are used.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-time-range-picker-does-not-work-in-dashboard-where-report/m-p/148255#M41466</link>
      <description>&lt;P&gt;Here are the common problems when adding a control.&lt;/P&gt;

&lt;P&gt;If you are editing your source manually, you need to change from a &lt;CODE&gt;dashboard&lt;/CODE&gt; to a &lt;CODE&gt;form&lt;/CODE&gt; so you change the first and last tags from &lt;CODE&gt;dashboard&lt;/CODE&gt; and &lt;CODE&gt;/dashboard&lt;/CODE&gt; to &lt;CODE&gt;form&lt;/CODE&gt; and &lt;CODE&gt;/form&lt;/CODE&gt;.  If you do not do this, none of your controls will function even if everything else is correct.&lt;/P&gt;

&lt;P&gt;If you are not using a submit button, be sure to use &lt;CODE&gt;searchWhenChanged="true"&lt;/CODE&gt;:&lt;/P&gt;

&lt;P&gt;THIS WORKS:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;fieldset autoRun="true" submitButton="false"&amp;gt;
    &amp;lt;input type="time" token="time_tok1" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;Last 24 hours&amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;THIS DOES NOT WORK:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;fieldset autoRun="true" submitButton="false"&amp;gt;
    &amp;lt;input type="time" token="time_tok1"&amp;gt;
      &amp;lt;label&amp;gt;&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;Last 24 hours&amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also, there are 2 basic formats for searches with times and they use different tags to access the &lt;CODE&gt;timepicker&lt;/CODE&gt; value and they are NOT cross-compatible.  It is easy to cross-match the syntax which will not give an error but it will not work.  When you use &lt;CODE&gt;search&lt;/CODE&gt; tags, use &lt;CODE&gt;earliest&lt;/CODE&gt; and &lt;CODE&gt;latest&lt;/CODE&gt; but when you use &lt;CODE&gt;searchString&lt;/CODE&gt; or &lt;CODE&gt;query&lt;/CODE&gt; tags, use &lt;CODE&gt;earliestTime&lt;/CODE&gt; and &lt;CODE&gt;latestTime&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;panel&amp;gt;
  &amp;lt;table&amp;gt;
    &amp;lt;title&amp;gt;THIS ONE WORKS&amp;lt;/title&amp;gt;
    &amp;lt;search&amp;gt;
      &amp;lt;query&amp;gt;Your Search Here&amp;lt;/query&amp;gt;
      &amp;lt;earliest&amp;gt;$time_tok1.earliest$&amp;lt;/earliest&amp;gt;
      &amp;lt;latest&amp;gt;$time_tok1.latest$&amp;lt;/latest&amp;gt;
    &amp;lt;/search&amp;gt;
  &amp;lt;/table&amp;gt;
&amp;lt;/panel&amp;gt;
&amp;lt;panel&amp;gt;
  &amp;lt;table&amp;gt;
    &amp;lt;title&amp;gt;THIS ALSO WORKS&amp;lt;/title&amp;gt;
    &amp;lt;searchString&amp;gt;Your Search Here&amp;lt;/searchString&amp;gt;
    &amp;lt;earliestTime&amp;gt;$time_tok1.earliest$&amp;lt;/earliestTime&amp;gt;
    &amp;lt;latestTime&amp;gt;$time_tok1.latest$&amp;lt;/latestTime&amp;gt;
  &amp;lt;/table&amp;gt;
&amp;lt;/panel&amp;gt;
&amp;lt;panel&amp;gt;
  &amp;lt;table&amp;gt;
    &amp;lt;title&amp;gt;THIS ONE DOES NOT WORK&amp;lt;/title&amp;gt;
    &amp;lt;search&amp;gt;
      &amp;lt;query&amp;gt;Your Search Here&amp;lt;/query&amp;gt;
      &amp;lt;earliestTime&amp;gt;$time_tok1.earliest$&amp;lt;/earliest&amp;gt;
      &amp;lt;latestTime&amp;gt;$time_tok1.latest$&amp;lt;/latest&amp;gt;
    &amp;lt;/search&amp;gt;
  &amp;lt;/table&amp;gt;
&amp;lt;/panel&amp;gt;
&amp;lt;panel&amp;gt;
  &amp;lt;table&amp;gt;
    &amp;lt;title&amp;gt;THIS ALSO DOES NOT WORK&amp;lt;/title&amp;gt;
    &amp;lt;searchString&amp;gt;Your Search Here&amp;lt;/searchString&amp;gt;
    &amp;lt;earliest&amp;gt;$time_tok1.earliest$&amp;lt;/earliestTime&amp;gt;
    &amp;lt;latest&amp;gt;$time_tok1.latest$&amp;lt;/latestTime&amp;gt;
  &amp;lt;/table&amp;gt;
&amp;lt;/panel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Jul 2015 14:56:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-time-range-picker-does-not-work-in-dashboard-where-report/m-p/148255#M41466</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-30T14:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using time range picker does not work in dashboard where report searches are used.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-time-range-picker-does-not-work-in-dashboard-where-report/m-p/148256#M41467</link>
      <description>&lt;P&gt;Thanks for the answer... I checked this. It works for inline searches. But does not work with report base searches. &lt;/P&gt;

&lt;P&gt;We have a report "Optimze_Report" which I reference in form as&lt;/P&gt;

&lt;P&gt;In Panel I am trying to use it as&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;panel&amp;gt;
  &amp;lt;chart&amp;gt;
    &amp;lt;search base="OptimizeData"&amp;gt;
      &amp;lt;query&amp;gt;  ---- additional conditions to select only few rows from report---- &amp;lt;/query&amp;gt;
      &amp;lt;earliest&amp;gt;$time_tok1.earliest$&amp;lt;/earliest&amp;gt;
      &amp;lt;latest&amp;gt;$time_tok1.latest$&amp;lt;/latest&amp;gt;
    &amp;lt;/search&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get the output but not depending on time range. All the values are shown in the graph instead.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2015 06:45:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-time-range-picker-does-not-work-in-dashboard-where-report/m-p/148256#M41467</guid>
      <dc:creator>praspai</dc:creator>
      <dc:date>2015-07-31T06:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Using time range picker does not work in dashboard where report searches are used.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-time-range-picker-does-not-work-in-dashboard-where-report/m-p/148257#M41468</link>
      <description>&lt;P&gt;Given your clarification (you need to use a &lt;CODE&gt;timerangepicker&lt;/CODE&gt; with a &lt;CODE&gt;saved search&lt;/CODE&gt;), one of these 2 answer should work for you:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://answers.splunk.com/answers/104947/timerangepicker-for-a-dashboard.html"&gt;http://answers.splunk.com/answers/104947/timerangepicker-for-a-dashboard.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://answers.splunk.com/answers/109967/how-to-add-a-time-picker-in-a-dashboard-which-uses-a-hidden-saved-search.html"&gt;http://answers.splunk.com/answers/109967/how-to-add-a-time-picker-in-a-dashboard-which-uses-a-hidden-saved-search.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2015 13:49:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-time-range-picker-does-not-work-in-dashboard-where-report/m-p/148257#M41468</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-31T13:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: Using time range picker does not work in dashboard where report searches are used.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-time-range-picker-does-not-work-in-dashboard-where-report/m-p/148258#M41469</link>
      <description>&lt;P&gt;There's some great information here.&lt;/P&gt;

&lt;P&gt;Specific to the request here around being able to include a report on your dashboard, and use the time range from the dashboard picker rather than the report's time range, here is how you do it.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Test Report Time Range&amp;lt;/label&amp;gt;

  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="time" token="time"&amp;gt;
      &amp;lt;label&amp;gt;&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;
        &amp;lt;earliest&amp;gt;-60m@m&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
      &amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;

  &amp;lt;!-- Includes reference report, which by default, will use the time range defined in the report object --&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;title&amp;gt;Reference Report using Report Time Range&amp;lt;/title&amp;gt;

        &amp;lt;search ref="Top_Sourcetypes_Last_4_Hours"&amp;gt;&amp;lt;/search&amp;gt;

      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;

  &amp;lt;!-- Include reference report, but override the time range with the earliest/latest values set in the time picker above --&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;title&amp;gt;Reference Report using Dashboard Picker Time Range&amp;lt;/title&amp;gt;

        &amp;lt;search ref="Top_Sourcetypes_Last_4_Hours"&amp;gt;
          &amp;lt;earliest&amp;gt;$time.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$time.latest$&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;

      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;

&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Aug 2015 18:54:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-time-range-picker-does-not-work-in-dashboard-where-report/m-p/148258#M41469</guid>
      <dc:creator>nfilippi_splunk</dc:creator>
      <dc:date>2015-08-04T18:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using time range picker does not work in dashboard where report searches are used.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-time-range-picker-does-not-work-in-dashboard-where-report/m-p/148259#M41470</link>
      <description>&lt;P&gt;Thanks for the answers. I am new to splunk. I got the example in Dashboard examples where its suggested to define time range where Global search is defined in dashboard which solved my issue. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;earliest&amp;gt;$time.earliest$&amp;lt;/earliest&amp;gt;
&amp;lt;latest&amp;gt;$time.latest$&amp;lt;/latest&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Aug 2015 13:45:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-time-range-picker-does-not-work-in-dashboard-where-report/m-p/148259#M41470</guid>
      <dc:creator>praspai</dc:creator>
      <dc:date>2015-08-05T13:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using time range picker does not work in dashboard where report searches are used.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-time-range-picker-does-not-work-in-dashboard-where-report/m-p/148260#M41471</link>
      <description>&lt;P&gt;This exactly matches the answer that I first gave you (except that they named their token differently than I named mine).  In any case, you should select an answer (yours or mine) and click "Accept" to close the question.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2015 13:48:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-time-range-picker-does-not-work-in-dashboard-where-report/m-p/148260#M41471</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-08-05T13:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using time range picker does not work in dashboard where report searches are used.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-time-range-picker-does-not-work-in-dashboard-where-report/m-p/148261#M41472</link>
      <description>&lt;P&gt;Note, that if your saved-search is a scheduled report, then the  and  tags do not apply in the dashboard -as far as I can tell anyway. All of the data created by the scheduled search over the scheduled time-period is displayed.  If you remove the schedule from the saved search, then the "earliest" and "latest" tags will be applied in the dashboard as described above. &lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2016 19:20:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-time-range-picker-does-not-work-in-dashboard-where-report/m-p/148261#M41472</guid>
      <dc:creator>benton</dc:creator>
      <dc:date>2016-07-18T19:20:31Z</dc:date>
    </item>
  </channel>
</rss>

