<?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 count total empty object? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-total-empty-object/m-p/616088#M214096</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/250081"&gt;@alakdam&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;panel&amp;gt;
      &amp;lt;single&amp;gt;
        &amp;lt;title&amp;gt;Average Actual Boxes with an empty value&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index::service sourcetype::service "order_tote_analytics" | spath "data.order_number" | search "data.order_number"=$orderNumber$ 
| spath path=data{}.actual_totes output=RealData 
| eval countNull=if(RealData == "{}", "this has value", "this is all null") 
| eventstats count AS total
| search RealData="{}"
| stats count values(total) AS total
| eval average=count/total*100
| table average&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;$chosenTimePeriod.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$chosenTimePeriod.latest$&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="colorMode"&amp;gt;block&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="rangeColors"&amp;gt;["0x53a051","0x53a051","0x53a051"]&amp;lt;/option&amp;gt;
        &amp;lt;option name="rangeValues"&amp;gt;[0,200]&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
        &amp;lt;option name="useColors"&amp;gt;1&amp;lt;/option&amp;gt;
      &amp;lt;/single&amp;gt;
    &amp;lt;/panel&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Thu, 06 Oct 2022 06:37:50 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2022-10-06T06:37:50Z</dc:date>
    <item>
      <title>How to count total empty object?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-total-empty-object/m-p/615980#M214053</link>
      <description>&lt;P&gt;I have a data where I got empty object. I would like count in total how many empty object in one table data and also make average on this empty object.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;PS:&amp;nbsp;&lt;STRONG&gt;I am beginner level splunker and could not able to figure How Can I do&amp;nbsp;&lt;/STRONG&gt;&lt;STRONG&gt;average of empty object?&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;This was my failed attempt:&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index::service sourcetype::service "order_tote_analytics" | spath "data.order_number" | search "data.order_number"=* |  spath path=data{}.actual_totes output=finalBox | eval countNull=if(finalBox == "{}", "this has value", "this is all null") | table finalBox countNull&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Above search query return me this &lt;span class="lia-unicode-emoji" title=":backhand_index_pointing_down:"&gt;👇🏾&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":backhand_index_pointing_down:"&gt;👇🏾&lt;/span&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-10-05 at 15.33.20.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/21899i024C710CD969A406/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2022-10-05 at 15.33.20.png" alt="Screenshot 2022-10-05 at 15.33.20.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 13:32:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-total-empty-object/m-p/615980#M214053</guid>
      <dc:creator>alakdam</dc:creator>
      <dc:date>2022-10-05T13:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to count total empty object</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-total-empty-object/m-p/615983#M214054</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/250081"&gt;@alakdam&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please try something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index::service sourcetype::service "order_tote_analytics" 
| spath "data.order_number" 
| search "data.order_number"=* 
|  spath path=data{}.actual_totes output=finalBox 
| eval countNull=if(finalBox == "{}", "this has value", "this is all null") 
| search RealData="{}"
| stats count&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 12:58:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-total-empty-object/m-p/615983#M214054</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-10-05T12:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to count total empty object?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-total-empty-object/m-p/615999#M214061</link>
      <description>&lt;P&gt;Thank you very much. How can I make average of it&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 14:47:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-total-empty-object/m-p/615999#M214061</guid>
      <dc:creator>alakdam</dc:creator>
      <dc:date>2022-10-05T14:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to count total empty object?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-total-empty-object/m-p/616011#M214065</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/250081"&gt;@alakdam&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;in this case you have to add the count all the events, something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index::service sourcetype::service "order_tote_analytics" 
| spath "data.order_number" 
| search "data.order_number"=* 
|  spath path=data{}.actual_totes output=finalBox 
| eval countNull=if(finalBox == "{}", "this has value", "this is all null") 
| eventstats count AS total
| search RealData="{}"
| stats count values(total) AS total
| eval average=count/total*100&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 15:07:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-total-empty-object/m-p/616011#M214065</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-10-05T15:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to count total empty object?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-total-empty-object/m-p/616019#M214069</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;Thank you very much.&amp;nbsp; I would love to publish that average value in one single panel. How would I do that.&amp;nbsp; I did like this &lt;span class="lia-unicode-emoji" title=":backhand_index_pointing_down:"&gt;👇🏾&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":backhand_index_pointing_down:"&gt;👇🏾&lt;/span&gt; but it does not show me average anymore &lt;span class="lia-unicode-emoji" title=":pensive_face:"&gt;😔&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":pensive_face:"&gt;😔&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;  &amp;lt;panel&amp;gt;
      &amp;lt;single&amp;gt;
        &amp;lt;title&amp;gt;Average Actual Boxes with an empty value&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index::service sourcetype::service "order_tote_analytics" | spath "data.order_number" | search "data.order_number"=$orderNumber$ 
| spath path=data{}.actual_totes output=RealData 
| eval countNull=if(RealData == "{}", "this has value", "this is all null") 
| eventstats count AS total
| search RealData="{}"
| stats count values(total) AS total
| eval average=count/total*100&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;$chosenTimePeriod.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$chosenTimePeriod.latest$&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="colorMode"&amp;gt;block&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="rangeColors"&amp;gt;["0x53a051","0x53a051","0x53a051"]&amp;lt;/option&amp;gt;
        &amp;lt;option name="rangeValues"&amp;gt;[0,200]&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
        &amp;lt;option name="useColors"&amp;gt;1&amp;lt;/option&amp;gt;
      &amp;lt;/single&amp;gt;
    &amp;lt;/panel&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 15:31:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-total-empty-object/m-p/616019#M214069</guid>
      <dc:creator>alakdam</dc:creator>
      <dc:date>2022-10-05T15:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to count total empty object?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-total-empty-object/m-p/616023#M214072</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/250081"&gt;@alakdam&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;add&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| table average&lt;/LI-CODE&gt;&lt;P&gt;as last row of your search&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 15:39:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-total-empty-object/m-p/616023#M214072</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-10-05T15:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to count total empty object?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-total-empty-object/m-p/616027#M214074</link>
      <description>&lt;P&gt;Did not help &lt;span class="lia-unicode-emoji" title=":pensive_face:"&gt;😔&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":pensive_face:"&gt;😔&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":pensive_face:"&gt;😔&lt;/span&gt;. Could please copy my panel example and show to me? Also I don't think we need condition. what do you say?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 15:44:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-total-empty-object/m-p/616027#M214074</guid>
      <dc:creator>alakdam</dc:creator>
      <dc:date>2022-10-05T15:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to count total empty object?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-total-empty-object/m-p/616088#M214096</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/250081"&gt;@alakdam&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;panel&amp;gt;
      &amp;lt;single&amp;gt;
        &amp;lt;title&amp;gt;Average Actual Boxes with an empty value&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index::service sourcetype::service "order_tote_analytics" | spath "data.order_number" | search "data.order_number"=$orderNumber$ 
| spath path=data{}.actual_totes output=RealData 
| eval countNull=if(RealData == "{}", "this has value", "this is all null") 
| eventstats count AS total
| search RealData="{}"
| stats count values(total) AS total
| eval average=count/total*100
| table average&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;$chosenTimePeriod.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$chosenTimePeriod.latest$&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="colorMode"&amp;gt;block&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="rangeColors"&amp;gt;["0x53a051","0x53a051","0x53a051"]&amp;lt;/option&amp;gt;
        &amp;lt;option name="rangeValues"&amp;gt;[0,200]&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
        &amp;lt;option name="useColors"&amp;gt;1&amp;lt;/option&amp;gt;
      &amp;lt;/single&amp;gt;
    &amp;lt;/panel&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 06:37:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-total-empty-object/m-p/616088#M214096</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-10-06T06:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to count total empty object?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-total-empty-object/m-p/616090#M214098</link>
      <description>&lt;P&gt;You are legend. As it said in your profile. Thanks a bunch&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 06:45:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-total-empty-object/m-p/616090#M214098</guid>
      <dc:creator>alakdam</dc:creator>
      <dc:date>2022-10-06T06:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to count total empty object?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-total-empty-object/m-p/616094#M214100</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/250081"&gt;@alakdam&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I didn't give the definition, but anywaythanks for the compliment!&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Please accept one answer for the other people of Community&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 06:47:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-total-empty-object/m-p/616094#M214100</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-10-06T06:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to count total empty object?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-total-empty-object/m-p/616096#M214101</link>
      <description>&lt;P&gt;I know I am asking a lot. Can you please help me with this &lt;A href="https://community.splunk.com/t5/Splunk-Search/Pie-chart-average-value-in-three-slices/m-p/616082#M214092" target="_self"&gt;Problem? &lt;/A&gt;I still don't understand splunk docs&lt;/P&gt;&lt;P&gt;Thank you &lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏🏾&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 06:53:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-total-empty-object/m-p/616096#M214101</guid>
      <dc:creator>alakdam</dc:creator>
      <dc:date>2022-10-06T06:53:25Z</dc:date>
    </item>
  </channel>
</rss>

