<?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 time range filter based on specific column when using loadjob savedsearch query in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Add-time-range-filter-based-on-specific-column-when-using/m-p/671566#M54983</link>
    <description>&lt;P&gt;i added the command | add info&amp;nbsp;&lt;BR /&gt;and i think that it works&lt;BR /&gt;i will do validations but thanks a lot! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Dec 2023 13:19:17 GMT</pubDate>
    <dc:creator>maayan</dc:creator>
    <dc:date>2023-12-12T13:19:17Z</dc:date>
    <item>
      <title>Add time range filter based on specific column when using loadjob savedsearch query</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Add-time-range-filter-based-on-specific-column-when-using/m-p/671534#M54974</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm using: loadjob savedsearch because my query is big and it takes time to load.&lt;BR /&gt;I have some multi-select filters and i want to add input time range filter.&lt;BR /&gt;(| loadjob savedsearch="mp:search:queryName" | where $pc$ AND&amp;nbsp; $Version$ )&lt;BR /&gt;&lt;BR /&gt;I'm not sure how to do that because i need to use a field called: Timestamp (i get it in my query, this is the time the event is written to the json file ) and not&amp;nbsp; the _time field.&lt;BR /&gt;In addition, I don't know how to use loadjob savedsearch with time range filter&lt;/P&gt;&lt;P&gt;Can you help me, please?&lt;BR /&gt;&lt;BR /&gt;Thank,&lt;BR /&gt;Maayan&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 10:47:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Add-time-range-filter-based-on-specific-column-when-using/m-p/671534#M54974</guid>
      <dc:creator>maayan</dc:creator>
      <dc:date>2023-12-12T10:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Add time range filter based on specific column when using loadjob savedsearch query</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Add-time-range-filter-based-on-specific-column-when-using/m-p/671536#M54975</link>
      <description>&lt;P&gt;You can't use the time range filter on loadjob savedsearch for this purpose. The time range filter on the loadjob command applies to when the saved search was executed (and its results saved). It is not applied to the results themselves. For this you would have to use a where command (as you already have), and for time ranges, you should parse your timestamp field into and epoch time (using the strptime() function) so that it can be compared with other epoch time values e.g. the start and end of your desired time range.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 10:58:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Add-time-range-filter-based-on-specific-column-when-using/m-p/671536#M54975</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-12-12T10:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: Add time range filter based on specific column when using loadjob savedsearch query</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Add-time-range-filter-based-on-specific-column-when-using/m-p/671546#M54977</link>
      <description>&lt;P&gt;thanks. I'm trying to do something like that but&amp;nbsp; it doesn't work:&lt;BR /&gt;(my TimeStamp field format is: &lt;SPAN&gt;2023-11-07 16:43:05.227&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&amp;lt;form version="1.1" theme="dark"&amp;gt;&lt;BR /&gt;&amp;lt;label&amp;gt;time try&amp;lt;/label&amp;gt;&lt;BR /&gt;&amp;lt;search id="bla"&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;earliest&amp;gt;$field1.earliest$&amp;lt;/earliest&amp;gt;&lt;BR /&gt;&amp;lt;latest&amp;gt;$field1.latest$&amp;lt;/latest&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;query&amp;gt; | loadjob savedsearch="mp:search:query name"&lt;BR /&gt;&lt;BR /&gt;| where $pc$ AND $version$ AND TimeStamp&amp;amp;gt;$field1.earliest$ AND TimeStamp&amp;amp;lt;$field1.latest$&lt;BR /&gt;&lt;BR /&gt;&amp;lt;/query&amp;gt;&lt;BR /&gt;&amp;lt;/search&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;fieldset submitButton="true" autoRun="false"&amp;gt;&lt;BR /&gt;&amp;lt;input type="time" token="field1"&amp;gt;&lt;BR /&gt;&amp;lt;label&amp;gt;&amp;lt;/label&amp;gt;&lt;BR /&gt;&amp;lt;default&amp;gt;&lt;BR /&gt;&amp;lt;earliest&amp;gt;-1d@h&amp;lt;/earliest&amp;gt;&lt;BR /&gt;&amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;&lt;BR /&gt;&amp;lt;/default&amp;gt;&lt;BR /&gt;&amp;lt;/input&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;input type="multiselect" token="pc" searchWhenChanged="true"&amp;gt;&lt;BR /&gt;&amp;lt;label&amp;gt;pc&amp;lt;/label&amp;gt;&lt;BR /&gt;&amp;lt;choice value="%"&amp;gt;All&amp;lt;/choice&amp;gt;&lt;BR /&gt;&amp;lt;default&amp;gt;%&amp;lt;/default&amp;gt;&lt;BR /&gt;&amp;lt;prefix&amp;gt;(&amp;lt;/prefix&amp;gt;&lt;BR /&gt;&amp;lt;suffix&amp;gt;)&amp;lt;/suffix&amp;gt;&lt;BR /&gt;&amp;lt;valuePrefix&amp;gt;(pc like("&amp;lt;/valuePrefix&amp;gt;&lt;BR /&gt;&amp;lt;valueSuffix&amp;gt;"))&amp;lt;/valueSuffix&amp;gt;&lt;BR /&gt;&amp;lt;delimiter&amp;gt; OR &amp;lt;/delimiter&amp;gt;&lt;BR /&gt;&amp;lt;fieldForLabel&amp;gt;pc&amp;lt;/fieldForLabel&amp;gt;&lt;BR /&gt;&amp;lt;fieldForValue&amp;gt;pc&amp;lt;/fieldForValue&amp;gt;&lt;BR /&gt;&amp;lt;search base="bla"&amp;gt;&lt;BR /&gt;&amp;lt;query&amp;gt; | where ( $version$)&lt;BR /&gt;| dedup pc| fields pc &amp;lt;/query&amp;gt;&lt;BR /&gt;&amp;lt;/search&amp;gt;&lt;BR /&gt;&amp;lt;/input&amp;gt;&lt;BR /&gt;........&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 11:53:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Add-time-range-filter-based-on-specific-column-when-using/m-p/671546#M54977</guid>
      <dc:creator>maayan</dc:creator>
      <dc:date>2023-12-12T11:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Add time range filter based on specific column when using loadjob savedsearch query</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Add-time-range-filter-based-on-specific-column-when-using/m-p/671547#M54978</link>
      <description>&lt;P&gt;As I said, you need to parse your timestamp field using the strptime() function so that you can compare it with other time values, e.g. earliest and latest. Having said that, you should probably use addinfo to get the min and max times used in the search.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 11:57:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Add-time-range-filter-based-on-specific-column-when-using/m-p/671547#M54978</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-12-12T11:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: Add time range filter based on specific column when using loadjob savedsearch query</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Add-time-range-filter-based-on-specific-column-when-using/m-p/671548#M54979</link>
      <description>&lt;P&gt;Can you write me from your experience how to &lt;SPAN&gt;parse my timestamp field to be able to be compared with&lt;/SPAN&gt;&amp;nbsp;earliest, latest parameters please?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 12:02:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Add-time-range-filter-based-on-specific-column-when-using/m-p/671548#M54979</guid>
      <dc:creator>maayan</dc:creator>
      <dc:date>2023-12-12T12:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: Add time range filter based on specific column when using loadjob savedsearch query</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Add-time-range-filter-based-on-specific-column-when-using/m-p/671550#M54980</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;query&amp;gt; | loadjob savedsearch="mp:search:query name"
| addinfo
| where $pc$ AND $version$ AND strptime(TimeStamp,"%F %T.%3N")&amp;amp;gt;info_min_time AND strptime(TimeStamp,"%F %T.%3N")&amp;amp;lt;info_max_time

&amp;lt;/query&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 12 Dec 2023 12:08:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Add-time-range-filter-based-on-specific-column-when-using/m-p/671550#M54980</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-12-12T12:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: Add time range filter based on specific column when using loadjob savedsearch query</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Add-time-range-filter-based-on-specific-column-when-using/m-p/671560#M54982</link>
      <description>&lt;P&gt;thanks!! i used min, max because add_info didn't work for me. but it doesn't work, when i select a range (for example 4 hours) in the time filter the data that i get is not between this range. maybe i should do something with&amp;nbsp;$field1.earliest$,&amp;nbsp;$field1.latest$?&lt;BR /&gt;&lt;BR /&gt;my code:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;search id="bla"&amp;gt;

&amp;lt;earliest&amp;gt;$field1.earliest$&amp;lt;/earliest&amp;gt;
&amp;lt;latest&amp;gt;$field1.latest$&amp;lt;/latest&amp;gt;

&amp;lt;query&amp;gt; | loadjob savedsearch="mp:search:query name"

| eventstats max(_time) as maxtime, min(_time) as mintime

| where $pc$ AND $version$
AND strptime(TimeStamp,"%F %T.%3N")&amp;amp;gt;mintime AND strptime(TimeStamp,"%F %T.%3N")&amp;amp;lt;maxtime
&amp;lt;/query&amp;gt;
&amp;lt;/search&amp;gt;

&amp;lt;fieldset submitButton="true" autoRun="false"&amp;gt;
&amp;lt;input type="time" token="field1"&amp;gt;
&amp;lt;label&amp;gt;&amp;lt;/label&amp;gt;
&amp;lt;default&amp;gt;
&amp;lt;earliest&amp;gt;-1d@h&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;&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 12 Dec 2023 13:02:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Add-time-range-filter-based-on-specific-column-when-using/m-p/671560#M54982</guid>
      <dc:creator>maayan</dc:creator>
      <dc:date>2023-12-12T13:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: Add time range filter based on specific column when using loadjob savedsearch query</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Add-time-range-filter-based-on-specific-column-when-using/m-p/671566#M54983</link>
      <description>&lt;P&gt;i added the command | add info&amp;nbsp;&lt;BR /&gt;and i think that it works&lt;BR /&gt;i will do validations but thanks a lot! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 13:19:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Add-time-range-filter-based-on-specific-column-when-using/m-p/671566#M54983</guid>
      <dc:creator>maayan</dc:creator>
      <dc:date>2023-12-12T13:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: Add time range filter based on specific column when using loadjob savedsearch query</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Add-time-range-filter-based-on-specific-column-when-using/m-p/671572#M54984</link>
      <description>&lt;P&gt;The command is addinfo not add_info - the problem with using "$field1.earliest$" and "$field1.latest$" is that they can contain string and not epoch times, whereas addinfo provides the epoch times derived from the timepicker.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 13:29:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Add-time-range-filter-based-on-specific-column-when-using/m-p/671572#M54984</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-12-12T13:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Add time range filter based on specific column when using loadjob savedsearch query</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Add-time-range-filter-based-on-specific-column-when-using/m-p/747588#M58785</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've solved my case,&amp;nbsp; basically there are 2 step :&lt;/P&gt;&lt;P&gt;1. Build correct job output on saved search, better to specific time format :&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval timeframe = strftime(_time, "%Y-%m-%d %H:%M:%S %Z")

Output : 

timeframe	hostname	availability
2025-03-08 00:00:00 +07	HostA	100
2025-03-09 00:00:00 +07	HostA	100&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. On dashboard add time range panel rename token to &lt;STRONG&gt;$time_range$&lt;/STRONG&gt;, then create handling to convert time to epoch&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| loadjob savedsearch="admin:itsi:sla_availability" artifact_offset=0
| eval timeframe_epoch = strptime(timeframe, "%Y-%m-%d %H:%M:%S %z")
| eval earliest_epoch = strptime("$time_range.earliest$", "%Y-%m-%dT%H:%M:%S.%3NZ")
| eval latest_epoch   = strptime("$time_range.latest$", "%Y-%m-%dT%H:%M:%S.%3NZ")
| where timeframe_epoch &amp;gt;= earliest_epoch AND timeframe_epoch &amp;lt;= latest_epoch
| table *&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, the output data will be specific time only :), as of know only date range selection only works,&lt;/P&gt;&lt;P&gt;will test for dynamic selection like last 7 days, last 30 day, etc&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 20:02:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Add-time-range-filter-based-on-specific-column-when-using/m-p/747588#M58785</guid>
      <dc:creator>muhammad_luthfi</dc:creator>
      <dc:date>2025-06-05T20:02:31Z</dc:date>
    </item>
  </channel>
</rss>

