# SLO returned as N/A due to "empty" metric calculation

**URL:** <https://community.dynatrace.com/t/slo-returned-as-n-a-due-to-empty-metric-calculation/33099>\
**Category:** Automations\
**Tags:** dynatrace-managed, slo\
**Created:** [October 27, 2021, 8:28am UTC](https://community.dynatrace.com/t/slo-returned-as-n-a-due-to-empty-metric-calculation/33099 "2021-10-27T08:28:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stiuzz](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/stiuzz/32/23010_2.png) [@Stiuzz](https://community.dynatrace.com/u/Stiuzz)\
**Post date:** [October 27, 2021, 8:28am UTC](https://community.dynatrace.com/t/slo-returned-as-n-a-due-to-empty-metric-calculation/33099/1 "2021-10-27T08:28:10Z")

</div>

Hi all,

before opening a RFE I would like to understand if there is a way to solve this: We have an application where users can browse several funnels, we created a custom metrics to count the user actions for each funnel and we configured some key request for each funnel that report about problems with the current user action in the funnel. We created a SLO to measure the percentage of ok actions against ko actions using this formula:

(CustomMetricResponseTime\_CountOfTotalActionInTheFunnel - KeyRequestCount\_SumOfTotalKoActionInTheFunnel) /&nbsp;CustomMetricResponseTime\_CountOfTotalActionInTheFunnel \* 100

The problem here is that if, in the timeframe, there aren’t any Ko actions the metric for the key user action (KeyRequestCount\_SumOfTotalKoActionInTheFunnel) is returned as empty (Not “null” or “0”) and for this reason the SLO is reported as N/A (Phylosophically as the measure is a count a “0” should be returned).

I tried to apply several transformation to the metrics (:default(0), :fold, +(1), etc) to obtain a valid value that could be used in calculation but with no result.

Does anyone have a solution for this?

Regards

Stefano

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [November 4, 2021, 8:11pm UTC](https://community.dynatrace.com/t/slo-returned-as-n-a-due-to-empty-metric-calculation/33099/2 "2021-11-04T20:11:33Z")

</div>

Depending on if you are a Managed or SaaS customer, Dynatrace SaaS is rolling out a cluster update which contains updates to SLOs. I would recommend reviewing the SLO once you get the latest update 1.229

---

<div class="post-metadata">

**Author:** ![PhilH](https://avatars.discourse-cdn.com/v4/letter/p/7ab992/32.png) [@PhilH](https://community.dynatrace.com/u/PhilH)\
**Post date:** [March 3, 2022, 9:08pm UTC](https://community.dynatrace.com/t/slo-returned-as-n-a-due-to-empty-metric-calculation/33099/3 "2022-03-03T21:08:12Z")

</div>

I am having the same issue, have you found a solution which works?

---

<div class="post-metadata">

**Author:** ![Stiuzz](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/stiuzz/32/23010_2.png) [@Stiuzz](https://community.dynatrace.com/u/Stiuzz)\
**Post date:** [March 17, 2022, 6:20pm UTC](https://community.dynatrace.com/t/slo-returned-as-n-a-due-to-empty-metric-calculation/33099/4 "2022-03-17T18:20:29Z")

</div>

Hi Chad,

where is the solution to this problem? I tried to configure a SLO with version \> 1.229 but the issue is still present both in SLO and in calculated metrics, still not able to calculate when a metric result as empty.

Do I miss something?

Regards

---

<div class="post-metadata">

**Author:** ![wolfgang\_heider](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/wolfgang_heider/32/12831_2.png) [@wolfgang\_heider](https://community.dynatrace.com/u/wolfgang_heider)\
**Post date:** [March 25, 2022, 11:28am UTC](https://community.dynatrace.com/t/slo-returned-as-n-a-due-to-empty-metric-calculation/33099/5 "2022-03-25T11:28:50Z")

</div>

Hi everyone,

could you please confirm:

The metrics you use were not just created, but already had data.

Just for the timeframe of the SLO there is no data but in the past there was already data?

To find a solution for that (on the product side) I try to find out the best option. Because right after a custom metric was defined (without data stored yet), the metric does not allow any query yet. That would be an explanation - if that is was the case with your SLOs.

---

<div class="post-metadata">

**Author:** ![Stiuzz](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/stiuzz/32/23010_2.png) [@Stiuzz](https://community.dynatrace.com/u/Stiuzz)\
**Post date:** [July 8, 2022, 9:03am UTC](https://community.dynatrace.com/t/slo-returned-as-n-a-due-to-empty-metric-calculation/33099/6 "2022-07-08T09:03:14Z")

</div>

Hi Wolfgang,

sorry for the delay, I can confirm that the metrics contain data, the problem is about the referenced timeframe, if no ko actions are detected the SLO is returned as N/A.

There is as well this product idea that is about the same topic and that was accepted and planned (But still with no updates):

[https://community.dynatrace.com/t5/Dynatrace-product-ideas/RFE-Metric-transformation-to-return-0-when-count-on-aggregated/idi-p/174966](https://community.dynatrace.com/post/174966)

Regards

Stefano

---

<div class="post-metadata">

**Author:** ![Tom\_Eaton](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/tom_eaton/32/27852_2.png) [@Tom\_Eaton](https://community.dynatrace.com/u/Tom_Eaton)\
**Post date:** [March 31, 2023, 10:24pm UTC](https://community.dynatrace.com/t/slo-returned-as-n-a-due-to-empty-metric-calculation/33099/7 "2023-03-31T22:24:54Z")

</div>

Hi,

A colleague of mine had that issue today. There is a new parameter available in the defualt(0) which is always: defualt(0,always). - we tried this and it worked.

> **[Metrics API - Metric selector](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/metric-v2/metric-selector)**
>
> Configure the metric selector for the Metric v2 API.
