<?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: Create a summary table with usernames /last 7 days /last 30 days in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Create-a-summary-table-with-usernames-last-7-days-last-30-days/m-p/336300#M99824</link>
    <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search earliest=-30d@d 
| eval Last7days=if(_time&amp;gt;=relative_time(now(),"-7d@d"),1,0)
| stats sum(Last7days) as "number for calls for last 7 days" count as "number for calls for last 30 days" by username
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 11 Dec 2017 21:57:38 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2017-12-11T21:57:38Z</dc:date>
    <item>
      <title>Create a summary table with usernames /last 7 days /last 30 days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-a-summary-table-with-usernames-last-7-days-last-30-days/m-p/336297#M99821</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;

&lt;P&gt;I am trying to create a report where I am able to get the list of username's / number for calls for last 7 days but unable to add another field number for calls for last 30 days. the list should look something like this &lt;BR /&gt;
i.e list of username's / number for calls for last 7 days/number for calls for last 30 days.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2017 20:03:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-a-summary-table-with-usernames-last-7-days-last-30-days/m-p/336297#M99821</guid>
      <dc:creator>raviteja029</dc:creator>
      <dc:date>2017-12-11T20:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: Create a summary table with usernames /last 7 days /last 30 days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-a-summary-table-with-usernames-last-7-days-last-30-days/m-p/336298#M99822</link>
      <description>&lt;P&gt;@raviteja029&lt;/P&gt;

&lt;P&gt;try this,&lt;/P&gt;

&lt;P&gt;your search  earliest=-7d@d latest=0d@d | eval weeknum="Last 7 days" | append [ search your search earliest=-30d@d latest=0d@d | eval weeknum="Last 30 days" ] | chart count over weeknum by username&lt;/P&gt;

&lt;P&gt;i hope this helps&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2017 21:11:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-a-summary-table-with-usernames-last-7-days-last-30-days/m-p/336298#M99822</guid>
      <dc:creator>sbbadri</dc:creator>
      <dc:date>2017-12-11T21:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: Create a summary table with usernames /last 7 days /last 30 days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-a-summary-table-with-usernames-last-7-days-last-30-days/m-p/336299#M99823</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;

&lt;P&gt;Thank you for the reply,&lt;BR /&gt;
I kind of did few tweaks and was able to get the response but only last 7 days value is correct and for last 30 days value its coming some value,&lt;/P&gt;

&lt;P&gt;Search - &lt;BR /&gt;
&lt;STRONG&gt;My Search&lt;/STRONG&gt; | eval weeknum="Last 7 days" | &lt;BR /&gt;
append [ search &lt;STRONG&gt;My Search&lt;/STRONG&gt; | eval weeknum="Last 30 days" ] &lt;BR /&gt;
| chart count over CustomerName by weeknum&lt;/P&gt;

&lt;P&gt;With this I am getting out as below -&lt;BR /&gt;
CustomerName | Last 30 days |  Last 7 days |&lt;BR /&gt;
abc   | 77 | 92385 |&lt;BR /&gt;
def | 87 | 235235 | &lt;/P&gt;

&lt;P&gt;Here Last 30 days value is incorrect &lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2017 21:44:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-a-summary-table-with-usernames-last-7-days-last-30-days/m-p/336299#M99823</guid>
      <dc:creator>raviteja029</dc:creator>
      <dc:date>2017-12-11T21:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: Create a summary table with usernames /last 7 days /last 30 days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-a-summary-table-with-usernames-last-7-days-last-30-days/m-p/336300#M99824</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search earliest=-30d@d 
| eval Last7days=if(_time&amp;gt;=relative_time(now(),"-7d@d"),1,0)
| stats sum(Last7days) as "number for calls for last 7 days" count as "number for calls for last 30 days" by username
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Dec 2017 21:57:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-a-summary-table-with-usernames-last-7-days-last-30-days/m-p/336300#M99824</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-12-11T21:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: Create a summary table with usernames /last 7 days /last 30 days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-a-summary-table-with-usernames-last-7-days-last-30-days/m-p/336301#M99825</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
Thank you very much.&lt;/P&gt;

&lt;P&gt;The search worked pretty well but I am getting a little extra number in last 7 days, it's taking for last 8 day's looks like changing "-7d@d" to "-6d@d" got much closer but I am assuming the start time has some lag now, can you confirm the start time is from last min to 7 days ?&lt;/P&gt;

&lt;P&gt;EX- &lt;BR /&gt;
Getting 238,121  for last 7 days but actual no.     242,408&lt;/P&gt;

&lt;P&gt;And for last 30 days is coming correct.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2017 22:18:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-a-summary-table-with-usernames-last-7-days-last-30-days/m-p/336301#M99825</guid>
      <dc:creator>raviteja029</dc:creator>
      <dc:date>2017-12-11T22:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Create a summary table with usernames /last 7 days /last 30 days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-a-summary-table-with-usernames-last-7-days-last-30-days/m-p/336302#M99826</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;

&lt;P&gt;Could you help me how to get the change in percentage for the results I get from a current week of calls to last week calls?&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;my Search&lt;/STRONG&gt; earliest=-14d@d latest=-7d@d | eval weeknum="Last Week" | &lt;BR /&gt;
append [ search &lt;STRONG&gt;my Search&lt;/STRONG&gt; earliest=-7d@d latest=-1m@m |  eval weeknum="Current Week" ]  | chart count over CustomerName by weeknum&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2017 23:24:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-a-summary-table-with-usernames-last-7-days-last-30-days/m-p/336302#M99826</guid>
      <dc:creator>raviteja029</dc:creator>
      <dc:date>2017-12-12T23:24:55Z</dc:date>
    </item>
  </channel>
</rss>

