<?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 write a search to display data from my database in a statistics table in my dashboard? in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-write-a-search-to-display-data-from-my-database-in-a/m-p/246253#M27963</link>
    <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | stats count(U*) as U* | transpose | rename column AS Property row1 AS count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 07 Jul 2016 16:37:21 GMT</pubDate>
    <dc:creator>sundareshr</dc:creator>
    <dc:date>2016-07-07T16:37:21Z</dc:date>
    <item>
      <title>How to write a search to display data from my database in a statistics table in my dashboard?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-write-a-search-to-display-data-from-my-database-in-a/m-p/246250#M27960</link>
      <description>&lt;P&gt;Hi everybody!&lt;/P&gt;

&lt;P&gt;I have got my Database like that :&lt;BR /&gt;
&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/1551i2ABDA256351C1D9A/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;And I would like to do a "Statistics Table" in my Dashboard like that :&lt;BR /&gt;
&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/1552i28BA8DEB3170E931/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;So I would like to :&lt;BR /&gt;
1) Use only all property who start with the "U" letter&lt;BR /&gt;
2) Count only when it's different of "null" or "" values&lt;/P&gt;

&lt;P&gt;Can you help me ? I am trying to do that but it's so hard for me...&lt;BR /&gt;
Thanx&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2016 08:48:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-write-a-search-to-display-data-from-my-database-in-a/m-p/246250#M27960</guid>
      <dc:creator>yzimmer</dc:creator>
      <dc:date>2016-07-07T08:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search to display data from my database in a statistics table in my dashboard?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-write-a-search-to-display-data-from-my-database-in-a/m-p/246251#M27961</link>
      <description>&lt;P&gt;You may have to modify it slightly to fit your exact needs, but try something like &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... PROPERTY=U* | stats count by PROPERTY
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Where &lt;CODE&gt;...&lt;/CODE&gt; is your other base search filtering, like on index or whatever that gets you your screenshot.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;PROPERTY=U*&lt;/CODE&gt; will include only your ones starting with U (which obviously makes the null ones go away).  For "empty" values, well, it really depends on exactly what you are doing calculation-wise.  Can you confirm they're an actual problem once you do the above, and if so include a few rows that should be not included and what your search is?  &lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2016 13:06:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-write-a-search-to-display-data-from-my-database-in-a/m-p/246251#M27961</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2016-07-07T13:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search to display data from my database in a statistics table in my dashboard?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-write-a-search-to-display-data-from-my-database-in-a/m-p/246252#M27962</link>
      <description>&lt;P&gt;Hi rich7177! Thanx for your answer!&lt;BR /&gt;
I tried your code like that but it doesn't work :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;* | PROPERTY=U* | stats count by PROPERTY
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I also tried to modify it but it doesn't work too :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;* | PROPERTY=UD818_APPLICATIONNAME | stats count by PROPERTY
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I don't understand why Splunk doesn't want to add the PROPERTY because that works (but this is not what I want...) :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;* | stats count by UD818_APPLICATIONNAME
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&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/1550iF23600E31DD5EBEE/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Do you have an other idea?&lt;/P&gt;

&lt;P&gt;Thanx a lot!&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2016 13:38:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-write-a-search-to-display-data-from-my-database-in-a/m-p/246252#M27962</guid>
      <dc:creator>yzimmer</dc:creator>
      <dc:date>2016-07-07T13:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search to display data from my database in a statistics table in my dashboard?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-write-a-search-to-display-data-from-my-database-in-a/m-p/246253#M27963</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | stats count(U*) as U* | transpose | rename column AS Property row1 AS count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Jul 2016 16:37:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-write-a-search-to-display-data-from-my-database-in-a/m-p/246253#M27963</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-07-07T16:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search to display data from my database in a statistics table in my dashboard?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-write-a-search-to-display-data-from-my-database-in-a/m-p/246254#M27964</link>
      <description>&lt;P&gt;No pipe before it.  I didn't know your base search so I just put elipses there.  To that just add the rest.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2016 17:24:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-write-a-search-to-display-data-from-my-database-in-a/m-p/246254#M27964</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2016-07-07T17:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search to display data from my database in a statistics table in my dashboard?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-write-a-search-to-display-data-from-my-database-in-a/m-p/246255#M27965</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | table U* | eval temp=1 | untable temp Property value | where isnotnull(value) AND value!="" | stats count by Property
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Jul 2016 18:18:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-write-a-search-to-display-data-from-my-database-in-a/m-p/246255#M27965</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-07-07T18:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search to display data from my database in a statistics table in my dashboard?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-write-a-search-to-display-data-from-my-database-in-a/m-p/246256#M27966</link>
      <description>&lt;P&gt;Thank you a lot to you three!&lt;/P&gt;

&lt;P&gt;Sundareshr your answer works perfectly! @somesoni2, your answer works too! Splunk only accepts one accepted answer for the forum, but your two ways work as I want!&lt;/P&gt;

&lt;P&gt;Have a good day !&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2016 08:09:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-write-a-search-to-display-data-from-my-database-in-a/m-p/246256#M27966</guid>
      <dc:creator>yzimmer</dc:creator>
      <dc:date>2016-07-08T08:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search to display data from my database in a statistics table in my dashboard?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-write-a-search-to-display-data-from-my-database-in-a/m-p/246257#M27967</link>
      <description>&lt;P&gt;Hi Somesoni2!&lt;/P&gt;

&lt;P&gt;Thanx for your answer &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2016 08:22:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-write-a-search-to-display-data-from-my-database-in-a/m-p/246257#M27967</guid>
      <dc:creator>yzimmer</dc:creator>
      <dc:date>2016-07-12T08:22:29Z</dc:date>
    </item>
  </channel>
</rss>

