<?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: Subtotal percentage with stats in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Subtotal-percentage-with-stats/m-p/556151#M157918</link>
    <description>&lt;P&gt;The reason for list rather than values is to keep the count and process in line because values sorts them. If you can't use list, you should consider creating a concatenated field before using values.&lt;/P&gt;</description>
    <pubDate>Thu, 17 Jun 2021 11:00:44 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2021-06-17T11:00:44Z</dc:date>
    <item>
      <title>Subtotal percentage with stats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Subtotal-percentage-with-stats/m-p/555946#M157862</link>
      <description>&lt;P&gt;I'm working with Windows events, and want to make following report/search:&lt;BR /&gt;&lt;BR /&gt;process1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Total XX XX%&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; command_line1 XX%&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; command_line2 XX%&lt;BR /&gt;…&lt;/P&gt;&lt;P&gt;process4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Total XX XX%&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; command_line1 XX%&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; command_line2 XX%&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I come up with:&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;`index_windows` EventCode=4688 
| fields Process_Command_Line, New_Process_Name 
| stats count(Process_Command_Line) as totalCount by New_Process_Name, Process_Command_Line
| eventstats sum(totalCount) as _total
| eventstats sum(totalCount) as _totalPerProcess by New_Process_Name
| eval percentageTotal=round((totalCount/_total)*100,2)
| eval precentagePerProcess=round((totalCount/_totalPerProcess)*100,2)
| sort - totalCount&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only thing is that I can't figure out how to merge fields by New_Process_Name&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dauren_akilbeko_0-1623837792088.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14651i265F46390044CFFB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dauren_akilbeko_0-1623837792088.png" alt="dauren_akilbeko_0-1623837792088.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 10:06:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Subtotal-percentage-with-stats/m-p/555946#M157862</guid>
      <dc:creator>dauren_akilbeko</dc:creator>
      <dc:date>2021-06-16T10:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: Subtotal percentage with stats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Subtotal-percentage-with-stats/m-p/555960#M157865</link>
      <description>&lt;LI-CODE lang="markup"&gt;`index_windows` EventCode=4688 
| fields Process_Command_Line, New_Process_Name 
| stats count(Process_Command_Line) as totalCount by New_Process_Name, Process_Command_Line
| eventstats sum(totalCount) as _total
| eventstats sum(totalCount) as _totalPerProcess by New_Process_Name
| eval percentageTotal=round((totalCount/_total)*100,2)
| eval precentagePerProcess=round((totalCount/_totalPerProcess)*100,2)
| stats list(Process_Command_Line) as Process_Command_line list(percentageTotal) as percentageTotal values(percentagePerProcess) as percentagePerProcess by New_Process_Name
| sort - totalCount&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 16 Jun 2021 12:04:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Subtotal-percentage-with-stats/m-p/555960#M157865</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-06-16T12:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: Subtotal percentage with stats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Subtotal-percentage-with-stats/m-p/556147#M157916</link>
      <description>&lt;P&gt;Thank you, so simple!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":face_with_rolling_eyes:"&gt;🙄&lt;/span&gt; Changed list to values though, as it hit the limit.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 09:22:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Subtotal-percentage-with-stats/m-p/556147#M157916</guid>
      <dc:creator>dauren_akilbeko</dc:creator>
      <dc:date>2021-06-17T09:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: Subtotal percentage with stats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Subtotal-percentage-with-stats/m-p/556151#M157918</link>
      <description>&lt;P&gt;The reason for list rather than values is to keep the count and process in line because values sorts them. If you can't use list, you should consider creating a concatenated field before using values.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 11:00:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Subtotal-percentage-with-stats/m-p/556151#M157918</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-06-17T11:00:44Z</dc:date>
    </item>
  </channel>
</rss>

