# Arithmetic expression with calculated metrics

**URL:** <https://community.dynatrace.com/t/arithmetic-expression-with-calculated-metrics/33057>\
**Category:** Dashboarding\
**Tags:** data-explorer\
**Created:** [October 21, 2021, 8:46am UTC](https://community.dynatrace.com/t/arithmetic-expression-with-calculated-metrics/33057 "2021-10-21T08:46:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Malaik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/malaik/32/32673_2.png) [@Malaik](https://community.dynatrace.com/u/Malaik)\
**Post date:** [October 21, 2021, 8:46am UTC](https://community.dynatrace.com/t/arithmetic-expression-with-calculated-metrics/33057/1 "2021-10-21T08:46:44Z")

</div>

Hello Members,

Im facing an issue.

I have 2 calculated metrics on RequestCount.

Example, in the last 1 Hour, I have 20 calls for one and 5 for the other showed in separated tiles on Dashboard.

I have another tile including the addition for both.

When I select the same time frame, I get No Data.

Please help us to fixe, its very urgent for the customer.

Good day.

 ![21.PNG](https://global.discourse-cdn.com/dynatrace/original/3X/3/e/3e91d5c2bc64e3163a37dd2bd3ceba2473d17ac4.png)  
 ![22.PNG](https://global.discourse-cdn.com/dynatrace/original/3X/2/9/2910fc75b394ca7ddfa340fa559bb0359da6b297.png)  
 ![23.PNG](https://global.discourse-cdn.com/dynatrace/original/2X/c/ccedd8180e0ddabb829dd43c284ecb3c4a154219.png)

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [October 21, 2021, 9:29am UTC](https://community.dynatrace.com/t/arithmetic-expression-with-calculated-metrics/33057/2 "2021-10-21T09:29:59Z")

</div>

Not sure what is the issue here, but you are missing aggregations definitely and I can also see the timeseries are sparse and you want to have a single value anyway.

Can you try the following expression?

```markup
(calc:service.accountopening_success_requestcount:splitBy():auto:fold)+(calc:service.accountopening_notsuccess_requestcount:splitBy():auto:fold)

```

---

<div class="post-metadata">

**Author:** ![Malaik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/malaik/32/32673_2.png) [@Malaik](https://community.dynatrace.com/u/Malaik)\
**Post date:** [October 21, 2021, 9:33am UTC](https://community.dynatrace.com/t/arithmetic-expression-with-calculated-metrics/33057/3 "2021-10-21T09:33:23Z")

</div>

Thanks Julius for your help and feedback.

Yes I found it quickly before your poste, so with only adding

```auto
:splitBy()

```

---

<div class="post-metadata">

**Author:** ![gilgi](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/gilgi/32/11747_2.png) [@gilgi](https://community.dynatrace.com/u/gilgi)\
**Post date:** [October 21, 2021, 2:54pm UTC](https://community.dynatrace.com/t/arithmetic-expression-with-calculated-metrics/33057/4 "2021-10-21T14:54:36Z")

</div>

As someone who is only getting to know the metrics expressions I find it the easiest to add 2 metrics to the data explorer, presented the way I want them to be and then just create the 3 by using the metric operation.

---

<div class="post-metadata">

**Author:** ![Malaik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/malaik/32/32673_2.png) [@Malaik](https://community.dynatrace.com/u/Malaik)\
**Post date:** [October 24, 2021, 6:24am UTC](https://community.dynatrace.com/t/arithmetic-expression-with-calculated-metrics/33057/5 "2021-10-24T06:24:13Z")

</div>

Hi&nbsp;[@gilgi](https://community.dynatrace.com/user/12008)

With a screenshot, your comment will be better to understand.

Thanks.

---

<div class="post-metadata">

**Author:** ![Malaik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/malaik/32/32673_2.png) [@Malaik](https://community.dynatrace.com/u/Malaik)\
**Post date:** [October 27, 2021, 10:14am UTC](https://community.dynatrace.com/t/arithmetic-expression-with-calculated-metrics/33057/6 "2021-10-27T10:14:10Z")

</div>

Hi&nbsp;[@Julius\_Loman](https://community.dynatrace.com/user/3364)&nbsp;  
Im facing a bug reported to Dynatrace.

When 1 of both metrics have NoData as result, the addition show NoData which is wrong.
