<?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: Display row, even when count over value is zero in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Display-row-even-when-count-over-value-is-zero/m-p/531809#M150219</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/229228"&gt;@JMFrank215&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's not actually counting over anything, it's just looking at the data that exists as&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp; says.&lt;/P&gt;&lt;P&gt;There is no what to know that your search term is supposed to be interpreted as a 'service'.&lt;/P&gt;&lt;P&gt;The simplest thing to do is to add this before your addtotals&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| append [
  | makeresults
  | eval Service=split("/abc,/mno,/xyz",",")
]
| stats values(*) as * by Service
| fillnull value=0
| addtotals&lt;/LI-CODE&gt;&lt;P&gt;Clearly your service names are not real, so in practice, you would most likely have a CSV file with your expected service names in there and inside the append, you would have a&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup your_service_list.csv&lt;/LI-CODE&gt;&lt;P&gt;which would contain a column called Service&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 03 Dec 2020 04:54:22 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2020-12-03T04:54:22Z</dc:date>
    <item>
      <title>Display row, even when count over value is zero</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-row-even-when-count-over-value-is-zero/m-p/531247#M150070</link>
      <description>&lt;P&gt;I have the following search:&lt;/P&gt;&lt;P&gt;index=aa sourcetype="bb" Service="/abc" OR Service="/mno" OR Service="/xyz" | chart count over Service by ZCode | addtotals&lt;/P&gt;&lt;P&gt;This returns the count of ZCode across /abc, /mno, and/xyz. Example would look like this:&lt;/P&gt;&lt;TABLE border="1" width="99.74763416998267%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="20.075757575757574%" height="25px"&gt;&lt;STRONG&gt;Service&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="19.94949494949495%" height="25px"&gt;&lt;STRONG&gt;200&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="19.94949494949495%" height="25px"&gt;&lt;STRONG&gt;400&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="19.94949494949495%" height="25px"&gt;&lt;STRONG&gt;500&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="9.974747474747476%" height="25px"&gt;&lt;STRONG&gt;504&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="9.974747474747476%" height="25px"&gt;&lt;STRONG&gt;Total&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20.075757575757574%" height="25px"&gt;&lt;STRONG&gt;/abc&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="19.94949494949495%" height="25px"&gt;2&lt;/TD&gt;&lt;TD width="19.94949494949495%" height="25px"&gt;3&lt;/TD&gt;&lt;TD width="19.94949494949495%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="9.974747474747476%" height="25px"&gt;2&lt;/TD&gt;&lt;TD width="9.974747474747476%" height="25px"&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20.075757575757574%" height="25px"&gt;&lt;STRONG&gt;/mno&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="19.94949494949495%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="19.94949494949495%" height="25px"&gt;4&lt;/TD&gt;&lt;TD width="19.94949494949495%" height="25px"&gt;0&lt;/TD&gt;&lt;TD width="9.974747474747476%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="9.974747474747476%" height="25px"&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20.075757575757574%" height="25px"&gt;&lt;STRONG&gt;/xyz&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="19.94949494949495%" height="25px"&gt;4&lt;/TD&gt;&lt;TD width="19.94949494949495%" height="25px"&gt;0&lt;/TD&gt;&lt;TD width="19.94949494949495%" height="25px"&gt;5&lt;/TD&gt;&lt;TD width="9.974747474747476%" height="25px"&gt;2&lt;/TD&gt;&lt;TD width="9.974747474747476%" height="25px"&gt;11&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem I'm facing is if the values for 200, 400, 500, and 504 are all zeros across one service, it will no longer display that service. Very new to Splunk but did a fair amount of research but could not find a solution. Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Nov 2020 00:58:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-row-even-when-count-over-value-is-zero/m-p/531247#M150070</guid>
      <dc:creator>JMFrank215</dc:creator>
      <dc:date>2020-11-29T00:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: Display row, even when count over value is zero</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-row-even-when-count-over-value-is-zero/m-p/531259#M150073</link>
      <description>&lt;P&gt;The reason you couldn't find a solution is that basically there is no (simple) solution. splunk reports what is there, not what is not there. If there are no entries for a service, let's say /abc, from your example, how does splunk know to report on it? What about service /cba or /nonexistent or /completelymadeup? In order for splunk to report on things it hasn't found events for, you need to add dummy events as part of your search. You can do this with append and makeresults or inputlookup or a join from a wider search where the services you are interested in did have events.&lt;/P&gt;</description>
      <pubDate>Sun, 29 Nov 2020 11:03:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-row-even-when-count-over-value-is-zero/m-p/531259#M150073</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-11-29T11:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: Display row, even when count over value is zero</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-row-even-when-count-over-value-is-zero/m-p/531361#M150095</link>
      <description>&lt;P&gt;interesting, I would think it would still know to report on it because it is counting over all three of those services. That makes sense though. Anywhere you can point me to on how I would create dummy events for these services? Very very new to Splunk and this type of thing in general - everything I'm seeing and reading is a little overwhelming&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2020 16:52:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-row-even-when-count-over-value-is-zero/m-p/531361#M150095</guid>
      <dc:creator>JMFrank215</dc:creator>
      <dc:date>2020-11-30T16:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: Display row, even when count over value is zero</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-row-even-when-count-over-value-is-zero/m-p/531809#M150219</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/229228"&gt;@JMFrank215&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's not actually counting over anything, it's just looking at the data that exists as&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp; says.&lt;/P&gt;&lt;P&gt;There is no what to know that your search term is supposed to be interpreted as a 'service'.&lt;/P&gt;&lt;P&gt;The simplest thing to do is to add this before your addtotals&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| append [
  | makeresults
  | eval Service=split("/abc,/mno,/xyz",",")
]
| stats values(*) as * by Service
| fillnull value=0
| addtotals&lt;/LI-CODE&gt;&lt;P&gt;Clearly your service names are not real, so in practice, you would most likely have a CSV file with your expected service names in there and inside the append, you would have a&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup your_service_list.csv&lt;/LI-CODE&gt;&lt;P&gt;which would contain a column called Service&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 04:54:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-row-even-when-count-over-value-is-zero/m-p/531809#M150219</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2020-12-03T04:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: Display row, even when count over value is zero</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-row-even-when-count-over-value-is-zero/m-p/531932#M150266</link>
      <description>&lt;P&gt;Thank you, that explanation was really helpful. I tried adding what you suggested but even after playing around with some of the syntax, I am still getting "E&lt;SPAN&gt;rror in 'eval' command: The arguments to the 'split' function are invalid." I can't seem to figure out why, maybe there's a small error in what I'm doing?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I can use my actual service names if that helps at all, was just being cautious about using actual information but can't imagine it matters at all. My search that returns the above error is below. It just has the three services called. Any input would be much appreciated&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;index=xx sourcetype="yy" Service="POST /loan/api/" OR Service="POST /credit/api/&amp;nbsp;OR Service="POST /transfer/api"&lt;/P&gt;&lt;P&gt;| chart count over Service by ZCode&lt;/P&gt;&lt;P&gt;| append [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | makeresults&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | eval Service=split("POST /loan/api/", "POST /deposit/api/",&amp;nbsp;"POST /transfer/api")&lt;/P&gt;&lt;P&gt;]&lt;/P&gt;&lt;P&gt;| stats values(*) as * by Service&lt;/P&gt;&lt;P&gt;| fillnull value=0&lt;/P&gt;&lt;P&gt;| addtotals&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 22:48:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-row-even-when-count-over-value-is-zero/m-p/531932#M150266</guid>
      <dc:creator>JMFrank215</dc:creator>
      <dc:date>2020-12-03T22:48:41Z</dc:date>
    </item>
    <item>
      <title>Re: Display row, even when count over value is zero</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-row-even-when-count-over-value-is-zero/m-p/531941#M150268</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/229228"&gt;@JMFrank215&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your split statement is wrong. It takes 2 params&lt;/P&gt;&lt;P&gt;1=the string to split&lt;/P&gt;&lt;P&gt;2=the delimiter&lt;/P&gt;&lt;P&gt;So, all the service names should be in a single string separated by comma and the delimiter is ","&lt;/P&gt;&lt;P&gt;So, that is creating a multi-value field called Service in the appended row, which is then used in the stats aggregation.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Dec 2020 01:04:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-row-even-when-count-over-value-is-zero/m-p/531941#M150268</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2020-12-04T01:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: Display row, even when count over value is zero</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-row-even-when-count-over-value-is-zero/m-p/531950#M150271</link>
      <description>&lt;P&gt;Ah okay, I totally misinterpreted that part of your first response - still a novice. Seems to run correctly now but is there a way for it to only show those newly created services if there are no counts for the service? So would like for it to show the actual call counts for loan/api/ and /credit/api (rows 4 and 5) and then since there were no calls for /transfer/api/, display the newly created service for that (row 3). Not sure if that is too complicated or not possible? Table displayed is below, really appreciate all your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="8.333333333333334%"&gt;&lt;STRONG&gt;Row #&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="8.333333333333334%" height="25px"&gt;&lt;STRONG&gt;Service&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;&lt;STRONG&gt;200&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;&lt;STRONG&gt;400&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;&lt;STRONG&gt;500&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;&lt;STRONG&gt;504&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;&lt;STRONG&gt;Total&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="8.333333333333334%"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="8.333333333333334%" height="47px"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; POST /loan/api/&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="47px"&gt;0&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="47px"&gt;0&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="47px"&gt;0&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="47px"&gt;0&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="47px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="8.333333333333334%"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="8.333333333333334%" height="47px"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; POST /credit/api/&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="47px"&gt;0&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="47px"&gt;0&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="47px"&gt;0&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="47px"&gt;0&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="47px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="8.333333333333334%"&gt;&lt;STRONG&gt;3&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="8.333333333333334%" height="47px"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; POST /transfer/api&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="47px"&gt;0&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="47px"&gt;0&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="47px"&gt;0&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="47px"&gt;0&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="47px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="8.333333333333334%"&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="8.333333333333334%" height="25px"&gt;&lt;STRONG&gt;POST /loan/api/&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;2&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;3&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;2&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="8.333333333333334%"&gt;&lt;STRONG&gt;5&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="8.333333333333334%" height="25px"&gt;&lt;STRONG&gt;POST /credit/api/&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;4&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;0&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 04 Dec 2020 02:19:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-row-even-when-count-over-value-is-zero/m-p/531950#M150271</guid>
      <dc:creator>JMFrank215</dc:creator>
      <dc:date>2020-12-04T02:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: Display row, even when count over value is zero</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-row-even-when-count-over-value-is-zero/m-p/532131#M150319</link>
      <description>&lt;P&gt;The table is not right in that it is not treating your POST /loan/api service (row 1) the same as your row 4. Looks like that's most likely because you have a space in front of the POST in your append split clause. Without the space you would only get 3 rows as it would treat 1+4 and 2+5 as the same services.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Dec 2020 22:58:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-row-even-when-count-over-value-is-zero/m-p/532131#M150319</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2020-12-06T22:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: Display row, even when count over value is zero</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-row-even-when-count-over-value-is-zero/m-p/532142#M150323</link>
      <description>&lt;P&gt;Yup, that did it. I missed that there couldn't be spaces between the services I wanted to split. Didn't realize Splunk was this strict, going to be tough to learn but hoping I get there eventually. Thanks so much for your help!&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2020 04:41:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-row-even-when-count-over-value-is-zero/m-p/532142#M150323</guid>
      <dc:creator>JMFrank215</dc:creator>
      <dc:date>2020-12-07T04:41:44Z</dc:date>
    </item>
  </channel>
</rss>

