<?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 Pulling Sub-Totals in a table in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Pulling-Sub-Totals-in-a-table/m-p/475561#M33264</link>
    <description>&lt;P&gt;I ingested a .CSV into Splunk which contained some patching information derived from another system.  The problem with the report is that it's producing multiple rows with the same patch information.  I ran it through Splunk to see if I could clean it up some by using the following query:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;index=patching sourcetype=patching&lt;BR /&gt;
| stats count by Patch_History, Patch_Number, Count&lt;BR /&gt;
| sort -Count&lt;BR /&gt;
| stats list(Patch_History) as Count, list(Count) by Patch_Number&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;This query produced the following output:&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/287840-patching.jpg" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;I'd like to add a subtotal for each section.  I've tried using | addcolumns fieldname=" ", etc., but am not getting the desired results.  Any help is appreciated! &lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 05:00:32 GMT</pubDate>
    <dc:creator>itsmevic</dc:creator>
    <dc:date>2020-09-30T05:00:32Z</dc:date>
    <item>
      <title>Pulling Sub-Totals in a table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Pulling-Sub-Totals-in-a-table/m-p/475561#M33264</link>
      <description>&lt;P&gt;I ingested a .CSV into Splunk which contained some patching information derived from another system.  The problem with the report is that it's producing multiple rows with the same patch information.  I ran it through Splunk to see if I could clean it up some by using the following query:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;index=patching sourcetype=patching&lt;BR /&gt;
| stats count by Patch_History, Patch_Number, Count&lt;BR /&gt;
| sort -Count&lt;BR /&gt;
| stats list(Patch_History) as Count, list(Count) by Patch_Number&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;This query produced the following output:&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/287840-patching.jpg" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;I'd like to add a subtotal for each section.  I've tried using | addcolumns fieldname=" ", etc., but am not getting the desired results.  Any help is appreciated! &lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:00:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Pulling-Sub-Totals-in-a-table/m-p/475561#M33264</guid>
      <dc:creator>itsmevic</dc:creator>
      <dc:date>2020-09-30T05:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling Sub-Totals in a table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Pulling-Sub-Totals-in-a-table/m-p/475562#M33265</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/191945"&gt;@itsmevic&lt;/a&gt; please try the following approach with eventstats to get the sum as Sub_Total and &lt;CODE&gt;values()&lt;/CODE&gt; or last() or first to show only one value for Sub_Total&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=patching sourcetype=patching
| stats count by Patch_History, Patch_Number, Count
| eventstats sum(Count) as Sub_Total by Patch_Number
| sort - Count
| stats list(Patch_History) as Patch_History, list(Count) as Count, values(Sub_Total) as Sub_Total by Patch_Number
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:00:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Pulling-Sub-Totals-in-a-table/m-p/475562#M33265</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2020-09-30T05:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling Sub-Totals in a table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Pulling-Sub-Totals-in-a-table/m-p/475563#M33266</link>
      <description>&lt;P&gt;Boom!  Nike, you are a lifesaver! Thank you!  The output is exactly what I need! &lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2020 02:55:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Pulling-Sub-Totals-in-a-table/m-p/475563#M33266</guid>
      <dc:creator>itsmevic</dc:creator>
      <dc:date>2020-04-14T02:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling Sub-Totals in a table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Pulling-Sub-Totals-in-a-table/m-p/475564#M33267</link>
      <description>&lt;P&gt;@itsmevic you were so close that I am sure you would have got it yourself after tea/coffee or may be a nap &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
Keep Splunking!!!&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2020 02:59:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Pulling-Sub-Totals-in-a-table/m-p/475564#M33267</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2020-04-14T02:59:44Z</dc:date>
    </item>
  </channel>
</rss>

