<?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: Get Invidiual Totals when stats count has a field that logs errors in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Get-Invidiual-Totals-when-stats-count-has-a-field-that-logs/m-p/669138#M229515</link>
    <description>&lt;P&gt;This doesnt show you the Total, Total should mean here (txnStatus=FAILED+txnStatus="SUCCEEDED")&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;With above solution the Total is only the total of 'FAILED' in txnStatus&lt;BR /&gt;&lt;BR /&gt;I want total to be the absolute total (FAILED + SUCCEEDED)&lt;/P&gt;</description>
    <pubDate>Mon, 20 Nov 2023 05:19:36 GMT</pubDate>
    <dc:creator>beriwalnishant</dc:creator>
    <dc:date>2023-11-20T05:19:36Z</dc:date>
    <item>
      <title>Get Invidiual Totals when stats count has a field that logs errors</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-Invidiual-Totals-when-stats-count-has-a-field-that-logs/m-p/668987#M229473</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a long searches, explored query that I am getting a way around.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If we do a simple query like this&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=zzzzzz
| stats count as Total, count(eval(txnStatus="FAILED")) as "Failed_Count", count(eval(txnStatus="SUCCEEDED")) as "Passed_Count" by country, type, ProductCode
| fields country, ProductCode, type, Failed_Count, Passed_Count, Total&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This above simple query gives me a result table where the total belongs to the specific country and productCode i.e. individual Total&lt;BR /&gt;&lt;BR /&gt;Now there is this field 'errorinfo' -&amp;nbsp; what I want is that I want to show the 'errorinfo' if its "codeerror"&amp;nbsp; as well in the above list like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=zzzzzz
| stats count as Total, count(eval(txnStatus="FAILED")) as "Failed_Count", count(eval(txnStatus="SUCCEEDED")) as "Passed_Count" by country, type, ProductCode, errorinfo
| fields country, ProductCode, type, Failed_Count, Passed_Count, errorinfo, Total&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This table shows results like this below&lt;/P&gt;&lt;TABLE width="575"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="54"&gt;country&lt;/TD&gt;&lt;TD width="87"&gt;ProductCode&lt;/TD&gt;&lt;TD width="35"&gt;type&lt;/TD&gt;&lt;TD width="89"&gt;Failed_Count&lt;/TD&gt;&lt;TD width="95"&gt;Passed_Count&lt;/TD&gt;&lt;TD width="177"&gt;errorinfo&lt;/TD&gt;&lt;TD width="38"&gt;Total&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;usa&lt;/TD&gt;&lt;TD&gt;111&lt;/TD&gt;&lt;TD&gt;1c&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;wrong code value&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;usa&lt;/TD&gt;&lt;TD&gt;111&lt;/TD&gt;&lt;TD&gt;1c&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;wrong field selected&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;usa&lt;/TD&gt;&lt;TD&gt;111&lt;/TD&gt;&lt;TD&gt;1c&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;60&lt;/TD&gt;&lt;TD&gt;NA&lt;/TD&gt;&lt;TD&gt;70&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I do so that I can see the results like this where Total remains the complete total&amp;nbsp; of field txnStatus (FAILED+SUCCEEDED)&lt;BR /&gt;&lt;BR /&gt;like below table - If I can achieve this I can do % total as well, if you see the Total belongs to one country - usa total shows usa total and canada total shows can total&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE width="439"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="54"&gt;country&lt;/TD&gt;&lt;TD width="87"&gt;ProductCode&lt;/TD&gt;&lt;TD width="35"&gt;type&lt;/TD&gt;&lt;TD width="89"&gt;Failed_Count&lt;/TD&gt;&lt;TD width="136"&gt;errorinfo&lt;/TD&gt;&lt;TD width="38"&gt;Total&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;usa&lt;/TD&gt;&lt;TD&gt;111&lt;/TD&gt;&lt;TD&gt;1c&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;wrong code value&lt;/TD&gt;&lt;TD&gt;70&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;usa&lt;/TD&gt;&lt;TD&gt;111&lt;/TD&gt;&lt;TD&gt;1c&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;wrong field selected&lt;/TD&gt;&lt;TD&gt;70&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;can&lt;/TD&gt;&lt;TD&gt;222&lt;/TD&gt;&lt;TD&gt;1b&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;wrong entry&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;can&lt;/TD&gt;&lt;TD&gt;222&lt;/TD&gt;&lt;TD&gt;1b&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;code not found&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;TABLE width="439"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="54"&gt;country&lt;/TD&gt;&lt;TD width="87"&gt;ProductCode&lt;/TD&gt;&lt;TD width="35"&gt;type&lt;/TD&gt;&lt;TD width="89"&gt;Failed_Count&lt;/TD&gt;&lt;TD width="136"&gt;errorinfo&lt;/TD&gt;&lt;TD width="38"&gt;Total&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;usa&lt;/TD&gt;&lt;TD&gt;111&lt;/TD&gt;&lt;TD&gt;1c&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;wrong code value&lt;/TD&gt;&lt;TD&gt;70&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;usa&lt;/TD&gt;&lt;TD&gt;111&lt;/TD&gt;&lt;TD&gt;1c&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;wrong field selected&lt;/TD&gt;&lt;TD&gt;70&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Nishant&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2023 11:08:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-Invidiual-Totals-when-stats-count-has-a-field-that-logs/m-p/668987#M229473</guid>
      <dc:creator>beriwalnishant</dc:creator>
      <dc:date>2023-11-17T11:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: Get Invidiual Totals when stats count has a field that logs errors</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-Invidiual-Totals-when-stats-count-has-a-field-that-logs/m-p/669060#M229489</link>
      <description>&lt;P&gt;The command you are looking for is &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Eventstats" target="_blank" rel="noopener"&gt;eventstats&lt;/A&gt;.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=zzzzzz
| stats count as Total, count(eval(txnStatus="FAILED")) as "Failed_Count", count(eval(txnStatus="SUCCEEDED")) as "Passed_Count" by country, type, ProductCode, errorinfo
| eventstats sum(Total) as Total by country
| fields country, ProductCode, type, Failed_Count, Passed_Count, errorinfo, Total&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2023 20:14:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-Invidiual-Totals-when-stats-count-has-a-field-that-logs/m-p/669060#M229489</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-11-17T20:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: Get Invidiual Totals when stats count has a field that logs errors</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-Invidiual-Totals-when-stats-count-has-a-field-that-logs/m-p/669138#M229515</link>
      <description>&lt;P&gt;This doesnt show you the Total, Total should mean here (txnStatus=FAILED+txnStatus="SUCCEEDED")&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;With above solution the Total is only the total of 'FAILED' in txnStatus&lt;BR /&gt;&lt;BR /&gt;I want total to be the absolute total (FAILED + SUCCEEDED)&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 05:19:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-Invidiual-Totals-when-stats-count-has-a-field-that-logs/m-p/669138#M229515</guid>
      <dc:creator>beriwalnishant</dc:creator>
      <dc:date>2023-11-20T05:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: Get Invidiual Totals when stats count has a field that logs errors</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-Invidiual-Totals-when-stats-count-has-a-field-that-logs/m-p/669287#M229554</link>
      <description>&lt;P&gt;The command you are looking for is still eventstats.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=zzzzzz
| stats count as Total, count(eval(txnStatus="FAILED")) as "Failed_Count", count(eval(txnStatus="SUCCEEDED")) as "Passed_Count" by country, type, ProductCode, errorinfo
| eventstats sum(Total) as Total
| fields country, ProductCode, type, Failed_Count, Passed_Count, errorinfo, Total&lt;/LI-CODE&gt;&lt;P&gt;It's all about how you group the results.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 06:11:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-Invidiual-Totals-when-stats-count-has-a-field-that-logs/m-p/669287#M229554</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-11-21T06:11:07Z</dc:date>
    </item>
  </channel>
</rss>

