<?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: To compare the value of particular day with the same day of the last week and last to last week. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/To-compare-the-value-of-particular-day-with-the-same-day-of-the/m-p/701411#M237923</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;As&amp;nbsp;CurrentWeek* is calculated dynamically , how can i put that field in the table command.&amp;nbsp;&lt;BR /&gt;If i use the below table command , it shows me the result in the same order.&amp;nbsp;&lt;BR /&gt;How can i reverse the order of the&amp;nbsp;CurrentWeek columns ???&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;| table A B C DAY_OF_WEEK Start_Time CurrentWeek*&amp;nbsp;Deviation&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Real_captain_0-1728475312762.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/33022i9450FB278D0A172A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Real_captain_0-1728475312762.png" alt="Real_captain_0-1728475312762.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 09 Oct 2024 12:02:00 GMT</pubDate>
    <dc:creator>Real_captain</dc:creator>
    <dc:date>2024-10-09T12:02:00Z</dc:date>
    <item>
      <title>To compare the value of particular day with the same day of the last week and last to last week.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-compare-the-value-of-particular-day-with-the-same-day-of-the/m-p/701301#M237901</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;BR /&gt;Can someone please tell me how we can compare the value of a particular day with the value of the same day of last week and create a new field as deviation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example :&amp;nbsp;&lt;BR /&gt;Below command generates the output as below :&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;| stats sum(Number_Events) as TOTAL by FIeld1 FIeld2&amp;nbsp; FIeld3 Day&amp;nbsp; Time Week_of_year Total&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Real_captain_3-1728394005350.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/32997i3C9BC52FF6188763/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Real_captain_3-1728394005350.png" alt="Real_captain_3-1728394005350.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;We need the output like below :&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;1. In tabular form : Is it possible to have an output like below :&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Real_captain_4-1728394466105.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/32998i221BC7C8EEFFC50D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Real_captain_4-1728394466105.png" alt="Real_captain_4-1728394466105.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;2. If point 1 is possible to be created , then Is it possible to have a time-chart with 3 lines over the 24 hours of the day . Example of data for 3 hours is attached&amp;nbsp;&lt;BR /&gt;1 line corresponds to&amp;nbsp;Week of year -2 (39)&lt;BR /&gt;2nd line corresponds to&amp;nbsp;Week of year -1 (40)&lt;BR /&gt;3rd line corresponds to&amp;nbsp;Week of year (41)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Real_captain_5-1728394605105.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/32999iEF89594FE944C0BA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Real_captain_5-1728394605105.png" alt="Real_captain_5-1728394605105.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance to help me out.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2024 13:37:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-compare-the-value-of-particular-day-with-the-same-day-of-the/m-p/701301#M237901</guid>
      <dc:creator>Real_captain</dc:creator>
      <dc:date>2024-10-08T13:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: To compare the value of particular day with the same day of the last week and last to last week.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-compare-the-value-of-particular-day-with-the-same-day-of-the/m-p/701315#M237903</link>
      <description>&lt;LI-CODE lang="markup"&gt;| stats count as Total by field1 field2 field3 Day Time Week
| eval Week_{Week} = Total
| stats values(Week_*) as Week_* by field1 field2 field3 Day Time
| fillnull value=0
| eval Deviation=2*Week_41/(Week_39+Week_40)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 08 Oct 2024 15:28:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-compare-the-value-of-particular-day-with-the-same-day-of-the/m-p/701315#M237903</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-10-08T15:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: To compare the value of particular day with the same day of the last week and last to last week.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-compare-the-value-of-particular-day-with-the-same-day-of-the/m-p/701327#M237905</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thanks for the response.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But instead of hard-coading the week number to generate the deviation&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt; | eval Deviation=2*Week_41/(Week_39+Week_40)  the week &lt;/LI-CODE&gt;
&lt;P&gt;Can we dynamically give the dynamic value of the week as below :&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt; | eval Deviation=2*Week_{current_week}/(Week_{current_week - 1} +Week_{current_week - 2})&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;Thanks in advance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2024 22:48:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-compare-the-value-of-particular-day-with-the-same-day-of-the/m-p/701327#M237905</guid>
      <dc:creator>Real_captain</dc:creator>
      <dc:date>2024-10-08T22:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: To compare the value of particular day with the same day of the last week and last to last week.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-compare-the-value-of-particular-day-with-the-same-day-of-the/m-p/701373#M237911</link>
      <description>&lt;P&gt;Just re-evaluate Week after the stats command to be current week, current week -1 and current week -2 as appropriate&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2024 22:52:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-compare-the-value-of-particular-day-with-the-same-day-of-the/m-p/701373#M237911</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-10-08T22:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: To compare the value of particular day with the same day of the last week and last to last week.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-compare-the-value-of-particular-day-with-the-same-day-of-the/m-p/701392#M237917</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Can you please let me how can I correct the below stats command to&amp;nbsp;&lt;SPAN&gt;re-evaluate Week after the stats command to be current week, current week -1 and current week -2.&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;| stats count as Total by field1 field2 field3 Day Time Week&lt;BR /&gt;| eval Week_{Week} = Total&lt;BR /&gt;| stats values(Week_*) as Week_* by field1 field2 field3 Day Time&lt;BR /&gt;| fillnull value=0&lt;BR /&gt;| eval Deviation=2*&lt;STRONG&gt;Week_41/(Week_39+Week_40)&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 07:30:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-compare-the-value-of-particular-day-with-the-same-day-of-the/m-p/701392#M237917</guid>
      <dc:creator>Real_captain</dc:creator>
      <dc:date>2024-10-09T07:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: To compare the value of particular day with the same day of the last week and last to last week.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-compare-the-value-of-particular-day-with-the-same-day-of-the/m-p/701393#M237918</link>
      <description>&lt;LI-CODE lang="markup"&gt;| stats count as Total by field1 field2 field3 Day Time Week
| eventstats max(Week) as ThisWeek
| eval Week=if(Week=ThisWeek,"CurrentWeek","CurrentWeek".(Week-ThisWeek))
| eval {Week} = Total
| stats values(Current*) as Current* by field1 field2 field3 Day Time
| fillnull value=0
| eval Deviation=2*CurrentWeek/('CurrentWeek-2'+'CurrentWeek-1')&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 09 Oct 2024 09:12:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-compare-the-value-of-particular-day-with-the-same-day-of-the/m-p/701393#M237918</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-10-09T09:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: To compare the value of particular day with the same day of the last week and last to last week.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-compare-the-value-of-particular-day-with-the-same-day-of-the/m-p/701397#M237919</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp; : Thanks It worked. You are best &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Just a small correction related to the order of columns.&lt;BR /&gt;Is it possible to have &lt;STRONG&gt;currentweek-4&lt;/STRONG&gt; column first, then&amp;nbsp;&lt;STRONG&gt;currentweek-3 , then&amp;nbsp;currentweek-2&amp;nbsp; , then&amp;nbsp;currentweek-1 and&amp;nbsp;, currentweek in the end before Deviation.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Real_captain_1-1728466161262.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/33019iDAC63122AA25D97C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Real_captain_1-1728466161262.png" alt="Real_captain_1-1728466161262.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 09:29:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-compare-the-value-of-particular-day-with-the-same-day-of-the/m-p/701397#M237919</guid>
      <dc:creator>Real_captain</dc:creator>
      <dc:date>2024-10-09T09:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: To compare the value of particular day with the same day of the last week and last to last week.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-compare-the-value-of-particular-day-with-the-same-day-of-the/m-p/701398#M237920</link>
      <description>&lt;P&gt;Just append a table command listing the fields in the order you want them&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 09:52:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-compare-the-value-of-particular-day-with-the-same-day-of-the/m-p/701398#M237920</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-10-09T09:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: To compare the value of particular day with the same day of the last week and last to last week.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-compare-the-value-of-particular-day-with-the-same-day-of-the/m-p/701411#M237923</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;As&amp;nbsp;CurrentWeek* is calculated dynamically , how can i put that field in the table command.&amp;nbsp;&lt;BR /&gt;If i use the below table command , it shows me the result in the same order.&amp;nbsp;&lt;BR /&gt;How can i reverse the order of the&amp;nbsp;CurrentWeek columns ???&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;| table A B C DAY_OF_WEEK Start_Time CurrentWeek*&amp;nbsp;Deviation&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Real_captain_0-1728475312762.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/33022i9450FB278D0A172A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Real_captain_0-1728475312762.png" alt="Real_captain_0-1728475312762.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 12:02:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-compare-the-value-of-particular-day-with-the-same-day-of-the/m-p/701411#M237923</guid>
      <dc:creator>Real_captain</dc:creator>
      <dc:date>2024-10-09T12:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: To compare the value of particular day with the same day of the last week and last to last week.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-compare-the-value-of-particular-day-with-the-same-day-of-the/m-p/701414#M237924</link>
      <description>&lt;P&gt;Don't use wildcards or at least not for the -1 -2 -3 part - currently in your screenshot all the names are fixed&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 12:21:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-compare-the-value-of-particular-day-with-the-same-day-of-the/m-p/701414#M237924</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-10-09T12:21:00Z</dc:date>
    </item>
  </channel>
</rss>

