<?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: Subtract time from time picker token response in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Subtract-time-from-time-picker-token-response/m-p/468836#M30767</link>
    <description>&lt;P&gt;HI There&lt;/P&gt;

&lt;P&gt;One thing you could try is adding a base search to the dashboard who's sole purpose is to generate these secondary time tokens for you using makeresults, then pull the tokens from this to use in the other search&lt;/P&gt;

&lt;P&gt;|makeresults&lt;BR /&gt;
|eval new_earliest=$token1.earliest$-604800, new_latest=$token1.latest$-604800&lt;/P&gt;

&lt;P&gt;A little crude but should do the job&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 04:08:30 GMT</pubDate>
    <dc:creator>paulbannister</dc:creator>
    <dc:date>2020-09-30T04:08:30Z</dc:date>
    <item>
      <title>Subtract time from time picker token response</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Subtract-time-from-time-picker-token-response/m-p/468835#M30766</link>
      <description>&lt;P&gt;So I have a "complex search"  on a dashboard with a search and a subsearch. I currently have two time pickers on said dashboard, but would like only one. The main search is looking at timepicker1 via token1, and the subsearch is looking at timepicker2 via token2. What I want to do is have the subsearch look at token1 and take 7 days off, so I can do a comparison. so "selectedtime-7d". Is something like this possible. I have done quite a bit of tinkering with no success. &lt;/P&gt;

&lt;P&gt;EX: index=logs appname=web earliest=$token1.earliest$ latest=$token1.latest$ | appendcols [search  index=logs appname=web earliest=$token2.earliest$ latest=$token2.latest$]&lt;/P&gt;

&lt;P&gt;In theory for the subsearch I would like it to be something like  [search  index=logs appname=web earliest=($token1.earliest$-7d) latest=($token1.latest$-7d) ]&lt;/P&gt;

&lt;P&gt;Any way to make this happen?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 13:59:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Subtract-time-from-time-picker-token-response/m-p/468835#M30766</guid>
      <dc:creator>jeffreyleavy</dc:creator>
      <dc:date>2020-02-07T13:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: Subtract time from time picker token response</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Subtract-time-from-time-picker-token-response/m-p/468836#M30767</link>
      <description>&lt;P&gt;HI There&lt;/P&gt;

&lt;P&gt;One thing you could try is adding a base search to the dashboard who's sole purpose is to generate these secondary time tokens for you using makeresults, then pull the tokens from this to use in the other search&lt;/P&gt;

&lt;P&gt;|makeresults&lt;BR /&gt;
|eval new_earliest=$token1.earliest$-604800, new_latest=$token1.latest$-604800&lt;/P&gt;

&lt;P&gt;A little crude but should do the job&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:08:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Subtract-time-from-time-picker-token-response/m-p/468836#M30767</guid>
      <dc:creator>paulbannister</dc:creator>
      <dc:date>2020-09-30T04:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: Subtract time from time picker token response</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Subtract-time-from-time-picker-token-response/m-p/468837#M30768</link>
      <description>&lt;P&gt;How would I go about doing that? I have never used makeresults before, and this is my first time with tokens as well.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 20:07:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Subtract-time-from-time-picker-token-response/m-p/468837#M30768</guid>
      <dc:creator>jeffreyleavy</dc:creator>
      <dc:date>2020-02-07T20:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: Subtract time from time picker token response</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Subtract-time-from-time-picker-token-response/m-p/468838#M30769</link>
      <description>&lt;P&gt;I believe you're looking for this.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/558071/how-to-subtract-date-for-a-timechart-panel-from-th.html#answer-558579"&gt;https://answers.splunk.com/answers/558071/how-to-subtract-date-for-a-timechart-panel-from-th.html#answer-558579&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 20:20:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Subtract-time-from-time-picker-token-response/m-p/468838#M30769</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2020-02-07T20:20:50Z</dc:date>
    </item>
  </channel>
</rss>

