# How can I see the count of running process and add a default value 0 if process is not running?

**URL:** <https://community.dynatrace.com/t/how-can-i-see-the-count-of-running-process-and-add-a-default-value-0-if-process-is-not-running/53886>\
**Category:** Open Q&A\
**Tags:** dynatrace-managed, data-explorer, services, hosts-classic, processes\
**Created:** [October 28, 2025, 5:17am UTC](https://community.dynatrace.com/t/how-can-i-see-the-count-of-running-process-and-add-a-default-value-0-if-process-is-not-running/53886 "2025-10-28T05:17:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arunkumarbnp](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@Arunkumarbnp](https://community.dynatrace.com/u/Arunkumarbnp)\
**Post date:** [October 28, 2025, 5:17am UTC](https://community.dynatrace.com/t/how-can-i-see-the-count-of-running-process-and-add-a-default-value-0-if-process-is-not-running/53886/1 "2025-10-28T05:17:01Z")

</div>

I’ve created a metric to display the count of process running in host  
builtin:pgi.availability.state:filter(and(or(in(“dt.entity.process\_group”,entitySelector(“type(process\_group),entityName(~“procesname~”)”))))):splitBy(“availability.state”):count:sort(value(avg,descending)):limit(20):default(0.0)

This query displays the count if default was not added, but if default was added it displays the process availability metric instead of count.

How can I see the count of running process and add a default value 0 if process is not running?

---

<div class="post-metadata">

**Author:** ![p\_devulapalli](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/p_devulapalli/32/41590_2.png) [@p\_devulapalli](https://community.dynatrace.com/u/p_devulapalli)\
**Post date:** [October 28, 2025, 6:01am UTC](https://community.dynatrace.com/t/how-can-i-see-the-count-of-running-process-and-add-a-default-value-0-if-process-is-not-running/53886/2 "2025-10-28T06:01:43Z")

</div>

[@Arunkumarbnp](https://community.dynatrace.com/user/87029)&nbsp;Are you looking for the count of process running on host or the count of available and unavailable process on a host?

---

<div class="post-metadata">

**Author:** ![Arunkumarbnp](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@Arunkumarbnp](https://community.dynatrace.com/u/Arunkumarbnp)\
**Post date:** [October 28, 2025, 6:19am UTC](https://community.dynatrace.com/t/how-can-i-see-the-count-of-running-process-and-add-a-default-value-0-if-process-is-not-running/53886/3 "2025-10-28T06:19:03Z")

</div>

yes, Thanks for your reply&nbsp;[@p\_devulapalli](https://community.dynatrace.com/user/21657)&nbsp;  
I’m trying to display metric as single value or table  
while using single value type, the metric is empty if no process is running, so I tried adding default value as 0&nbsp;  
but if I add default value, the query displays the process availability metric instead of count of process running
