<?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: Sum function on output of summary index in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Sum-function-on-output-of-summary-index/m-p/532628#M9581</link>
    <description>&lt;P&gt;&lt;SPAN&gt;index=*1 sourcetype=s source="p" "File Catalog" "Completed"&lt;/SPAN&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;| dedup FILE_ID&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;SPAN&gt;| eval Date=strftime(_time, "%b/%d/%Y ")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;| stats count(FILE_ID)&lt;/FONT&gt; &lt;/STRONG&gt;as "File_Count_By_Day" by Date,XMIT_AUTH_USER_NM,XMIT_BASE_FILE_ID,XMIT_BASE_FILE_NM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;These counts will always be 1!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;index=*1 search_name="Daily File Transfer Counts" | dedup &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;BASE_FILE_ID&lt;/FONT&gt; &lt;/STRONG&gt;|table Date USER_NM BASE_FILE_ID FILE_NM File_Count_By_Day&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;| bin _time as week span=7d&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;| stats sum(File_Count_By_Day) as oneweek by XMIT_AUTH_USER_NM,XMIT_BASE_FILE_ID,XMIT_BASE_FILE_NM&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| eval week=strftime(_time,"%Y - %U")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;BASE_FILE_ID doesn't appear to be a field output by your summary query so you won't get any results? _time or week doesn't appear in your by list for your stats so doesn't affect the grouping&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Dec 2020 12:29:45 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2020-12-10T12:29:45Z</dc:date>
    <item>
      <title>Sum function on output of summary index</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Sum-function-on-output-of-summary-index/m-p/532585#M9580</link>
      <description>&lt;P&gt;I want to sum the output that is stored in summary index and display the output in dashboard which shows sum of all counts for one week.&lt;/P&gt;&lt;P&gt;Below is the code i am using but the output comes as the previous day output stored in summary index:&lt;/P&gt;&lt;P&gt;index=*1 search_name="Daily File Transfer Counts" | dedup BASE_FILE_ID |table Date USER_NM BASE_FILE_ID FILE_NM File_Count_By_Day&lt;BR /&gt;| bin _time as week span=7d&lt;BR /&gt;| stats sum(File_Count_By_Day) as oneweek by XMIT_AUTH_USER_NM,XMIT_BASE_FILE_ID,XMIT_BASE_FILE_NM&lt;BR /&gt;| eval week=strftime(_time,"%Y - %U")&lt;/P&gt;&lt;P&gt;My code in&amp;nbsp;Daily File Transfer Counts is as below:&lt;/P&gt;&lt;P&gt;index=*1 sourcetype=s source="p" "File Catalog" "Completed"&lt;BR /&gt;| dedup FILE_ID&lt;BR /&gt;| eval Date=strftime(_time, "%b/%d/%Y ")&lt;BR /&gt;| stats count(FILE_ID) as "File_Count_By_Day" by Date,XMIT_AUTH_USER_NM,XMIT_BASE_FILE_ID,XMIT_BASE_FILE_NM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking to count all the file that was transfers within a week for particular file(sum of&amp;nbsp;File_Count_By_Day within a week)&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 05:40:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Sum-function-on-output-of-summary-index/m-p/532585#M9580</guid>
      <dc:creator>supriyagaw08</dc:creator>
      <dc:date>2020-12-10T05:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: Sum function on output of summary index</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Sum-function-on-output-of-summary-index/m-p/532628#M9581</link>
      <description>&lt;P&gt;&lt;SPAN&gt;index=*1 sourcetype=s source="p" "File Catalog" "Completed"&lt;/SPAN&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;| dedup FILE_ID&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;SPAN&gt;| eval Date=strftime(_time, "%b/%d/%Y ")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;| stats count(FILE_ID)&lt;/FONT&gt; &lt;/STRONG&gt;as "File_Count_By_Day" by Date,XMIT_AUTH_USER_NM,XMIT_BASE_FILE_ID,XMIT_BASE_FILE_NM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;These counts will always be 1!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;index=*1 search_name="Daily File Transfer Counts" | dedup &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;BASE_FILE_ID&lt;/FONT&gt; &lt;/STRONG&gt;|table Date USER_NM BASE_FILE_ID FILE_NM File_Count_By_Day&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;| bin _time as week span=7d&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;| stats sum(File_Count_By_Day) as oneweek by XMIT_AUTH_USER_NM,XMIT_BASE_FILE_ID,XMIT_BASE_FILE_NM&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| eval week=strftime(_time,"%Y - %U")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;BASE_FILE_ID doesn't appear to be a field output by your summary query so you won't get any results? _time or week doesn't appear in your by list for your stats so doesn't affect the grouping&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 12:29:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Sum-function-on-output-of-summary-index/m-p/532628#M9581</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-12-10T12:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: Sum function on output of summary index</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Sum-function-on-output-of-summary-index/m-p/532771#M9582</link>
      <description>&lt;P&gt;Thanks for your help&amp;nbsp;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp; i got why the count was always coming as 1.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 10:53:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Sum-function-on-output-of-summary-index/m-p/532771#M9582</guid>
      <dc:creator>supriyagaw08</dc:creator>
      <dc:date>2020-12-11T10:53:17Z</dc:date>
    </item>
  </channel>
</rss>

