<?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: Single Report dashboard with multiple panels based on time range? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Report-dashboard-with-multiple-panels-based-on-time-range/m-p/635598#M52092</link>
    <description>&lt;P&gt;Agree, this is a far better solution, as 1 base search can give 4 panel results, unlike my suggested method which is less efficient with 4 base searches.&lt;/P&gt;</description>
    <pubDate>Thu, 23 Mar 2023 03:38:58 GMT</pubDate>
    <dc:creator>yeahnah</dc:creator>
    <dc:date>2023-03-23T03:38:58Z</dc:date>
    <item>
      <title>Single Report dashboard with multiple panels based on time range?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Report-dashboard-with-multiple-panels-based-on-time-range/m-p/635558#M52087</link>
      <description>&lt;P&gt;I have created a dashboard with multiple panels with each panel based on a dedicated report.&amp;nbsp; Here's an example. This works great but there must be a better way to do this instead of having 4 reports per dashboard when the only difference between the search is the time.&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;&amp;lt;dashboard&amp;gt;
  &amp;lt;label&amp;gt;Packets&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Daily&amp;lt;/title&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;search ref="Packets Daily"&amp;gt;&amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Weekly&amp;lt;/title&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;search ref="Packets Weekly"&amp;gt;&amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Monthly&amp;lt;/title&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;search ref="Packets Monthly"&amp;gt;&amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Yearly&amp;lt;/title&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;search ref="Packets Yearly"&amp;gt;&amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I would prefer to do is have one single report with each panel having the correct time frame.&amp;nbsp; I do not want a time picker displayed on the dashboard.&lt;/P&gt;&lt;P&gt;I tried using earliest and latest syntax in each search section of the xml but the time is inherited from the&lt;/P&gt;&lt;P&gt;report.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2023 21:07:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Report-dashboard-with-multiple-panels-based-on-time-range/m-p/635558#M52087</guid>
      <dc:creator>adsquaired</dc:creator>
      <dc:date>2023-03-22T21:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: Single Report dashboard with multiple panels based on time range?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Report-dashboard-with-multiple-panels-based-on-time-range/m-p/635583#M52090</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/242616"&gt;@adsquaired&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Yes, you can use the &lt;EM&gt;savedsearch&lt;/EM&gt; command and pass it the earliest and latest times as replaced field values.&amp;nbsp; Here's the doc ref.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/latest/SearchReference/Savedsearch" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/SplunkCloud/latest/SearchReference/Savedsearch&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;As an example&lt;BR /&gt;1. Create a saved search (report)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=_internal $earliest$ $latest$
| head 1
| addinfo
| foreach info_*_time [ eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;=strftime('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;', "%c") ]
| table _time info_min_time info_max_time&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-inline" image-alt="yeahnah_0-1679537841664.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24450i8C10050C4CFDC975/image-size/medium?v=v2&amp;amp;px=400" role="button" title="yeahnah_0-1679537841664.png" alt="yeahnah_0-1679537841664.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;2. Now run the report using the savedsearch command, passing in the earliest and latest variables as time modifiers (you can name these variables to whatever you like)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yeahnah_1-1679537912132.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24451i2562145B71D7B168/image-size/medium?v=v2&amp;amp;px=400" role="button" title="yeahnah_1-1679537912132.png" alt="yeahnah_1-1679537912132.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Note, the dashboard XML for the search would need to be something like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;search&amp;gt;
  &amp;lt;query&amp;gt;| savedsearch mysavedsearch earliest="earliest=-24h@h" latest="latest=-1m@m"&amp;lt;/query&amp;gt;
&amp;lt;/search&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Please mark as solution provided if this works for you.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 02:24:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Report-dashboard-with-multiple-panels-based-on-time-range/m-p/635583#M52090</guid>
      <dc:creator>yeahnah</dc:creator>
      <dc:date>2023-03-23T02:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: Single Report dashboard with multiple panels based on time range?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Report-dashboard-with-multiple-panels-based-on-time-range/m-p/635597#M52091</link>
      <description>&lt;P&gt;You can have a single daily packet report which is given a search id and then in the weekly/monthly/yearly you can just reference the daily report and post process calculate the appropriate periods with whatever aggregation you need.&lt;/P&gt;&lt;P&gt;Let's assume your daily packets search looks like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;my_packet_search
| timechart span=1d count &lt;/LI-CODE&gt;&lt;P&gt;then your dashboard would look like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;dashboard&amp;gt;
  &amp;lt;label&amp;gt;Packets&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Daily&amp;lt;/title&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;search ref="Packets Daily" id="daily_report"&amp;gt;&amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Weekly&amp;lt;/title&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;search id="weekly_report" base="daily_report"&amp;gt;
          &amp;lt;query&amp;gt;
| timechart span=1w sum(*) as *
          &amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Monthly&amp;lt;/title&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;search id="monthly_report" base="weekly_report"&amp;gt;
          &amp;lt;query&amp;gt;
| timechart span=1mon sum(*) as *
          &amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Yearly&amp;lt;/title&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;search base="monthly_report"&amp;gt;
          &amp;lt;query&amp;gt;
| timechart span=1y sum(*) as *
          &amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;The base search could be daily_report in all cases, but by simply calling each subsequent search its own id, you can use the slightly smaller dataset for the larger granularity calculation.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 03:35:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Report-dashboard-with-multiple-panels-based-on-time-range/m-p/635597#M52091</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-03-23T03:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: Single Report dashboard with multiple panels based on time range?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Report-dashboard-with-multiple-panels-based-on-time-range/m-p/635598#M52092</link>
      <description>&lt;P&gt;Agree, this is a far better solution, as 1 base search can give 4 panel results, unlike my suggested method which is less efficient with 4 base searches.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 03:38:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Report-dashboard-with-multiple-panels-based-on-time-range/m-p/635598#M52092</guid>
      <dc:creator>yeahnah</dc:creator>
      <dc:date>2023-03-23T03:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: Single Report dashboard with multiple panels based on time range?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Report-dashboard-with-multiple-panels-based-on-time-range/m-p/635722#M52105</link>
      <description>&lt;P&gt;I discovered the problem. The search behind the report was to restrictive on the time so I could not expand the time in the dashboard panels. Once I fixed that I was able to use the correct time modifiers in each panel.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;, I like the search id functionality and knowing I can tack span on to the query generated from the report is helpful.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 13:44:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Report-dashboard-with-multiple-panels-based-on-time-range/m-p/635722#M52105</guid>
      <dc:creator>adsquaired</dc:creator>
      <dc:date>2023-03-23T13:44:52Z</dc:date>
    </item>
  </channel>
</rss>

