<?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: How to add rows in table in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-rows-in-table/m-p/650539#M224906</link>
    <description>&lt;P&gt;Please show what you expect the result to be&lt;/P&gt;</description>
    <pubDate>Fri, 14 Jul 2023 11:46:06 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2023-07-14T11:46:06Z</dc:date>
    <item>
      <title>How to add rows in table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-rows-in-table/m-p/650511#M224891</link>
      <description>&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&lt;STRONG&gt;Status&lt;/STRONG&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&lt;STRONG&gt;Unit&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&lt;STRONG&gt;Count&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;Duplicate&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;IT&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;Failure&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;BE&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;Success&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;DE&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="24px"&gt;Success&lt;/TD&gt;&lt;TD height="24px"&gt;IT&lt;/TD&gt;&lt;TD height="24px"&gt;25&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="24px"&gt;Success&lt;/TD&gt;&lt;TD height="24px"&gt;PT&lt;/TD&gt;&lt;TD height="24px"&gt;18&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="24px"&gt;Success&lt;/TD&gt;&lt;TD height="24px"&gt;DE&lt;/TD&gt;&lt;TD height="24px"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="24px"&gt;Success&lt;/TD&gt;&lt;TD height="24px"&gt;PT&lt;/TD&gt;&lt;TD height="24px"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;Total&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&lt;P&gt;71&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am adding the col total using the query&lt;BR /&gt;| addcoltotals label=status lable =total&lt;BR /&gt;&lt;BR /&gt;But now I want to calculate the sum by Unit Like this-&lt;/P&gt;&lt;P&gt;After calculating the sum want to create an alert if any of the unit is 0 then it will create an alert.&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;IT&lt;/TD&gt;&lt;TD width="50%"&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;DE&lt;/TD&gt;&lt;TD width="50%"&gt;16&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;PT&lt;/TD&gt;&lt;TD width="50%"&gt;23&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;BE&lt;/TD&gt;&lt;TD width="50%"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="50%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;Total&lt;/TD&gt;&lt;TD width="50%"&gt;71&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 14 Jul 2023 08:50:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-rows-in-table/m-p/650511#M224891</guid>
      <dc:creator>avi7326</dc:creator>
      <dc:date>2023-07-14T08:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to add rows in table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-rows-in-table/m-p/650512#M224892</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats sum(count) as total by unit&lt;/LI-CODE&gt;&lt;P&gt;However, this will only give you totals greater than zero because there is nothing to add if there are no counts. If you want your alert to pick up on there being no values for a unit, you will have to append a row for each unit with a count of zero before this sum.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 08:56:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-rows-in-table/m-p/650512#M224892</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-07-14T08:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to add rows in table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-rows-in-table/m-p/650516#M224894</link>
      <description>&lt;P&gt;I want to do the total according to the status after calculating that I will check if the value is 0 for any unit It will create an alert&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;| stats sum(count) as total by unit&lt;/PRE&gt;&lt;P&gt;Using this it is not giving proper results .Do I have to remove addcolumns line.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 09:37:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-rows-in-table/m-p/650516#M224894</guid>
      <dc:creator>avi7326</dc:creator>
      <dc:date>2023-07-14T09:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to add rows in table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-rows-in-table/m-p/650525#M224896</link>
      <description>&lt;P&gt;Yes, remove the addcoltotals line or move it to after the stats, but you will need to change the column name as well.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 09:54:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-rows-in-table/m-p/650525#M224896</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-07-14T09:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to add rows in table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-rows-in-table/m-p/650535#M224904</link>
      <description>&lt;P&gt;Getting this table after using&lt;BR /&gt;|stats count as count by status Unit&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&lt;STRONG&gt;Status&lt;/STRONG&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&lt;STRONG&gt;Unit&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&lt;STRONG&gt;Count&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;Duplicate&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;IT&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;Failure&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;BE&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;Success&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;DE&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;Success&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;IT&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;25&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;Success&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;PT&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;18&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;Success&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;DE&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;Success&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;PT&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;But now I want it by the sum of unit according to the second table which given earlier.&lt;/P&gt;&lt;PRE&gt;| stats sum(count) as total by unit&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;This is not&amp;nbsp; giving me the expected result.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 11:18:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-rows-in-table/m-p/650535#M224904</guid>
      <dc:creator>avi7326</dc:creator>
      <dc:date>2023-07-14T11:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to add rows in table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-rows-in-table/m-p/650539#M224906</link>
      <description>&lt;P&gt;Please show what you expect the result to be&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 11:46:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-rows-in-table/m-p/650539#M224906</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-07-14T11:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to add rows in table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-rows-in-table/m-p/650540#M224907</link>
      <description>&lt;P&gt;I got it thanks&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 11:47:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-rows-in-table/m-p/650540#M224907</guid>
      <dc:creator>avi7326</dc:creator>
      <dc:date>2023-07-14T11:47:22Z</dc:date>
    </item>
  </channel>
</rss>

