<?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: Compare current week to last week in a visualisation in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-current-week-to-last-week-in-a-visualisation/m-p/641613#M222260</link>
    <description>&lt;P&gt;Ah yes, I was being silly and had the time frame set to 7 days rather than 14! Thank you for the help i really appreciate it!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Apr 2023 14:30:24 GMT</pubDate>
    <dc:creator>supersnedz</dc:creator>
    <dc:date>2023-04-27T14:30:24Z</dc:date>
    <item>
      <title>How to compare current week to last week in a visualisation?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-current-week-to-last-week-in-a-visualisation/m-p/641561#M222247</link>
      <description>&lt;P&gt;Hello, im looking to compare a count of servers that was reporting into splunk this week and compare to the amount that reported the week before. Im using the Dashboard studio for my visualisations.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My current query shows how many servers reported per day over the week: an represents the server name.&lt;/P&gt;
&lt;P&gt;index="siem-ips" cim_entity_zone="global" | timechart dc(an)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can i modify this to show what the previous week looked like over the current week?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 13:50:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-current-week-to-last-week-in-a-visualisation/m-p/641561#M222247</guid>
      <dc:creator>supersnedz</dc:creator>
      <dc:date>2023-04-27T13:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: Compare current week to last week in a visualisation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-current-week-to-last-week-in-a-visualisation/m-p/641564#M222249</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/37446"&gt;@supersnedz&lt;/a&gt;, you can follow up timechart with the timewrap command:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| timewrap 1w&lt;/LI-CODE&gt;&lt;P&gt;You can read more about timewrap over here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Timewrap" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Timewrap&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 10:32:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-current-week-to-last-week-in-a-visualisation/m-p/641564#M222249</guid>
      <dc:creator>rut</dc:creator>
      <dc:date>2023-04-27T10:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: Compare current week to last week in a visualisation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-current-week-to-last-week-in-a-visualisation/m-p/641583#M222254</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/255848"&gt;@rut&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the following:&lt;BR /&gt;index="siem-eu" cim_entity_zone="global" | timechart span=1d dc(an) | timewrap 1w&lt;BR /&gt;&lt;BR /&gt;It returned only one day from the previous week rather than the whole week.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="supersnedz_0-1682599066955.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/25112i98A81EFCDCD47D97/image-size/medium?v=v2&amp;amp;px=400" role="button" title="supersnedz_0-1682599066955.png" alt="supersnedz_0-1682599066955.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;is there a way i can do this for each day of the week?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 12:39:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-current-week-to-last-week-in-a-visualisation/m-p/641583#M222254</guid>
      <dc:creator>supersnedz</dc:creator>
      <dc:date>2023-04-27T12:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: Compare current week to last week in a visualisation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-current-week-to-last-week-in-a-visualisation/m-p/641590#M222257</link>
      <description>&lt;P&gt;Are you sure you're retrieving enough data (so the earliest is set correctly)?&lt;/P&gt;&lt;P&gt;You can play around with timewrap with the following example.&amp;nbsp; Try setting count to 8 (which matches your screenshot) and 21 (which compares three weeks):&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults count=14
``` Set up the data, count the days and subtract them from _time ```
| streamstats count
| eval _time=relative_time(_time, "-".(count -1)."d")
``` Chart the data by day ```
| timechart sum(count) span=1d
``` Compare it by week ```
| timewrap 1w&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 12:57:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-current-week-to-last-week-in-a-visualisation/m-p/641590#M222257</guid>
      <dc:creator>rut</dc:creator>
      <dc:date>2023-04-27T12:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Compare current week to last week in a visualisation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-current-week-to-last-week-in-a-visualisation/m-p/641613#M222260</link>
      <description>&lt;P&gt;Ah yes, I was being silly and had the time frame set to 7 days rather than 14! Thank you for the help i really appreciate it!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 14:30:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-current-week-to-last-week-in-a-visualisation/m-p/641613#M222260</guid>
      <dc:creator>supersnedz</dc:creator>
      <dc:date>2023-04-27T14:30:24Z</dc:date>
    </item>
  </channel>
</rss>

