<?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 Why is my search not showing the count in the resulting table? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-not-showing-the-count-in-the-resulting-table/m-p/271486#M81731</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have this query&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=cox UCE-|rex "UCE-(?&amp;lt;UCE_Code&amp;gt;(\d+))"|lookup UCECodes.csv UCE-Code as UCE_Code|eval ud=UCE_Code+" - "+Desc|eventstats count as grandtotal |eventstats count as ptotal by UCE_Code|eval aatype=if(match(source,"managedServer"),"managed","access")|chart values(Desc) as Description  count(UCE_Code) as "UCE Code Count" count(aatype="managed") as "Managed Server Log" count(aatype="access") as "Access Log" values(eval(round(ptotal/grandtotal*100,2))) as Percentage by UCE_Code |rename UCE_Code as "UCE Code - Click for Detail"|sort - "Percentage"|rename ud as "UCE Code - Description"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And I'm interested in the &lt;STRONG&gt;aatype&lt;/STRONG&gt; field.  When the query runs, the resulting table has everything correct, EXCEPT the columns "Managed Server Log" and "Access Log" are all zeros.  However, when I view the event fields, the &lt;STRONG&gt;aatype&lt;/STRONG&gt; field shows the correct values.&lt;/P&gt;

&lt;P&gt;What am I missing?&lt;/P&gt;

&lt;P&gt;Here is the statistics table and event field&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/2222iDC33C069BC3BFD9E/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 12 Dec 2016 20:03:37 GMT</pubDate>
    <dc:creator>dbcase</dc:creator>
    <dc:date>2016-12-12T20:03:37Z</dc:date>
    <item>
      <title>Why is my search not showing the count in the resulting table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-not-showing-the-count-in-the-resulting-table/m-p/271486#M81731</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have this query&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=cox UCE-|rex "UCE-(?&amp;lt;UCE_Code&amp;gt;(\d+))"|lookup UCECodes.csv UCE-Code as UCE_Code|eval ud=UCE_Code+" - "+Desc|eventstats count as grandtotal |eventstats count as ptotal by UCE_Code|eval aatype=if(match(source,"managedServer"),"managed","access")|chart values(Desc) as Description  count(UCE_Code) as "UCE Code Count" count(aatype="managed") as "Managed Server Log" count(aatype="access") as "Access Log" values(eval(round(ptotal/grandtotal*100,2))) as Percentage by UCE_Code |rename UCE_Code as "UCE Code - Click for Detail"|sort - "Percentage"|rename ud as "UCE Code - Description"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And I'm interested in the &lt;STRONG&gt;aatype&lt;/STRONG&gt; field.  When the query runs, the resulting table has everything correct, EXCEPT the columns "Managed Server Log" and "Access Log" are all zeros.  However, when I view the event fields, the &lt;STRONG&gt;aatype&lt;/STRONG&gt; field shows the correct values.&lt;/P&gt;

&lt;P&gt;What am I missing?&lt;/P&gt;

&lt;P&gt;Here is the statistics table and event field&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/2222iDC33C069BC3BFD9E/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2016 20:03:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-not-showing-the-count-in-the-resulting-table/m-p/271486#M81731</guid>
      <dc:creator>dbcase</dc:creator>
      <dc:date>2016-12-12T20:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my search not showing the count in the resulting table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-not-showing-the-count-in-the-resulting-table/m-p/271487#M81732</link>
      <description>&lt;P&gt;Hi there @dbcase&lt;/P&gt;

&lt;P&gt;Try like this,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=cox UCE- 
| rex "UCE-(?&amp;lt;UCE_Code&amp;gt;(\d+))" 
| lookup UCECodes.csv UCE-Code AS UCE_Code 
| eval ud=UCE_Code+" - "+Desc 
| eventstats count AS grandtotal 
| eventstats count AS ptotal by UCE_Code 
| eval aatype=if(match(source,"managedServer"), "managed", "access") 
| chart values(Desc) AS Description, count(UCE_Code) AS "UCE Code Count", count(eval(aatype="managed")) AS "Managed Server Log", count(eval(aatype="access")) AS "Access Log", values(eval(round(ptotal/grandtotal*100,2))) AS Percentage by UCE_Code 
| rename UCE_Code AS "UCE Code - Click for Detail" 
| sort - "Percentage"
| rename ud AS "UCE Code - Description"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Let me know if it works.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2016 20:32:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-not-showing-the-count-in-the-resulting-table/m-p/271487#M81732</guid>
      <dc:creator>alemarzu</dc:creator>
      <dc:date>2016-12-12T20:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my search not showing the count in the resulting table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-not-showing-the-count-in-the-resulting-table/m-p/271488#M81733</link>
      <description>&lt;P&gt;Hey alemarzu!   That worked perfectly!!!  Many thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2016 21:15:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-not-showing-the-count-in-the-resulting-table/m-p/271488#M81733</guid>
      <dc:creator>dbcase</dc:creator>
      <dc:date>2016-12-12T21:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my search not showing the count in the resulting table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-not-showing-the-count-in-the-resulting-table/m-p/271489#M81734</link>
      <description>&lt;P&gt;Nice, I'm glad it helped!&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2016 12:22:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-not-showing-the-count-in-the-resulting-table/m-p/271489#M81734</guid>
      <dc:creator>alemarzu</dc:creator>
      <dc:date>2016-12-13T12:22:10Z</dc:date>
    </item>
  </channel>
</rss>

