{"id":65245,"date":"2022-10-15T06:07:31","date_gmt":"2022-10-15T06:07:31","guid":{"rendered":"https:\/\/merikebi.warrenmyers.com\/?p=65245"},"modified":"2022-10-15T06:07:31","modified_gmt":"2022-10-15T06:07:31","slug":"answer-by-warren-for-splunk-eventstats-dcfield-is-including-null-values-as-unique","status":"publish","type":"post","link":"https:\/\/merikebi.warrenmyers.com\/?p=65245","title":{"rendered":"Answer by warren for Splunk eventstats dc(field) is including null values as unique"},"content":{"rendered":"<p>The value &quot;<code>null<\/code>&quot; is not &quot;null&quot;<\/p>\n<p>A &quot;null&quot; field in Splunk has no contents (see <a href=\"https:\/\/docs.splunk.com\/Documentation\/Splunk\/latest\/SearchReference\/Fillnull\" rel=\"nofollow noreferrer\"><code>fillnull<\/code><\/a>)<\/p>\n<p>If you have the literal string &quot;<code>null<\/code>&quot; in your field, it has a value (namely, &quot;<code>null<\/code>&quot;)<\/p>\n<p>If you do not want to count them, you need to filter them out before doing the <code>| stats dc(Field)<\/code><\/p>\n<p>For example, you could do this:<\/p>\n<pre><code>&lt;spl&gt;\n| search NOT Field=&quot;null&quot;\n| stats dc(Field) \n&lt;spl&gt;\n<\/code><\/pre>\n<p>from User warren &#8211; Stack Overflow https:\/\/stackoverflow.com\/questions\/74074477\/splunk-eventstats-dcfield-is-including-null-values-as-unique\/74077088#74077088<br \/>\nvia <a href=\"https:\/\/ifttt.com\/?ref=da&#038;site=wordpress\">IFTTT<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The value &quot;null&quot; is not &quot;null&quot; A &quot;null&quot; field in Splunk has no contents (see fillnull) If you have the literal string &quot;null&quot; in your field, it has a value (namely, &quot;null&quot;) If you do not want to count them, you need to filter them out before doing the | stats dc(Field) For example, you &hellip;<br \/><a href=\"https:\/\/merikebi.warrenmyers.com\/?p=65245\" class=\"more-link pen_button pen_element_default pen_icon_arrow_double\">Continue reading <span class=\"screen-reader-text\">Answer by warren for Splunk eventstats dc(field) is including null values as unique<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[991],"keyring_services":[],"class_list":["post-65245","post","type-post","status-publish","format-standard","hentry","category-blih","tag-stackexchange"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/65245","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=65245"}],"version-history":[{"count":1,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/65245\/revisions"}],"predecessor-version":[{"id":65246,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/65245\/revisions\/65246"}],"wp:attachment":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=65245"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=65245"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=65245"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fkeyring_services&post=65245"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}