<?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 Single Value Field Count in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Value-Field-Count/m-p/18887#M654</link>
    <description>&lt;P&gt;This should be an easy one for you guys.&lt;/P&gt;

&lt;P&gt;Basically, I'm trying to display the total number of hosts associated with an event into a single value:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;single&amp;gt;
  &amp;lt;searchString&amp;gt;eventtype="sp.*" | stats count(tag::host) | rangemap field=count low=1-1000000 default=low&amp;lt;/searchString&amp;gt;
  &amp;lt;title&amp;gt;# Of Active Customers&amp;lt;/title&amp;gt;
  &amp;lt;earliestTime&amp;gt;-4h&amp;lt;/earliestTime&amp;gt;
  &amp;lt;option name="afterLabel"&amp;gt;Customers&amp;lt;/option&amp;gt;
  &amp;lt;option name="linkFields"&amp;gt;result,beforeLabel&amp;lt;/option&amp;gt;
  &amp;lt;option name="classField"&amp;gt;range&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Driving me nuts!  I keep coming back with "N/A Customers" displayed in the button.&lt;/P&gt;</description>
    <pubDate>Thu, 30 Dec 2010 02:18:14 GMT</pubDate>
    <dc:creator>bchristensen</dc:creator>
    <dc:date>2010-12-30T02:18:14Z</dc:date>
    <item>
      <title>Single Value Field Count</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Value-Field-Count/m-p/18887#M654</link>
      <description>&lt;P&gt;This should be an easy one for you guys.&lt;/P&gt;

&lt;P&gt;Basically, I'm trying to display the total number of hosts associated with an event into a single value:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;single&amp;gt;
  &amp;lt;searchString&amp;gt;eventtype="sp.*" | stats count(tag::host) | rangemap field=count low=1-1000000 default=low&amp;lt;/searchString&amp;gt;
  &amp;lt;title&amp;gt;# Of Active Customers&amp;lt;/title&amp;gt;
  &amp;lt;earliestTime&amp;gt;-4h&amp;lt;/earliestTime&amp;gt;
  &amp;lt;option name="afterLabel"&amp;gt;Customers&amp;lt;/option&amp;gt;
  &amp;lt;option name="linkFields"&amp;gt;result,beforeLabel&amp;lt;/option&amp;gt;
  &amp;lt;option name="classField"&amp;gt;range&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Driving me nuts!  I keep coming back with "N/A Customers" displayed in the button.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Dec 2010 02:18:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Value-Field-Count/m-p/18887#M654</guid>
      <dc:creator>bchristensen</dc:creator>
      <dc:date>2010-12-30T02:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: Single Value Field Count</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Value-Field-Count/m-p/18888#M655</link>
      <description>&lt;P&gt;Looks like your field names aren't going to match coming out of &lt;CODE&gt;stats&lt;/CODE&gt;. Also, the example search is going to give you the number of host tags rather than of the number of the hosts -- is that what you intended?&lt;/P&gt;

&lt;P&gt;Try changing:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats count(tag::host)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;to (number of host tags):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats count(tag::host) as count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or (number of hosts):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats dc(host) as count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Dec 2010 07:20:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Value-Field-Count/m-p/18888#M655</guid>
      <dc:creator>southeringtonp</dc:creator>
      <dc:date>2010-12-30T07:20:27Z</dc:date>
    </item>
  </channel>
</rss>

