# Combining timeseries, can this be done

**URL:** <https://community.dynatrace.com/t/combining-timeseries-can-this-be-done/51937>\
**Category:** DQL\
**Tags:** dql, dynatrace-managed\
**Created:** [June 4, 2025, 1:52pm UTC](https://community.dynatrace.com/t/combining-timeseries-can-this-be-done/51937 "2025-06-04T13:52:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [June 4, 2025, 1:52pm UTC](https://community.dynatrace.com/t/combining-timeseries-can-this-be-done/51937/1 "2025-06-04T13:52:56Z")

</div>

Hello,

What if you have to time series and you want to add/subtract them to create a new one…

Can this be done, or a I over asking?

KR Henk

---

<div class="post-metadata">

**Author:** ![Theodore\_x86](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/theodore_x86/32/17620_2.png) [@Theodore\_x86](https://community.dynatrace.com/u/Theodore_x86)\
**Post date:** [June 4, 2025, 2:05pm UTC](https://community.dynatrace.com/t/combining-timeseries-can-this-be-done/51937/2 "2025-06-04T14:05:43Z")

</div>

Hello.

Are you looking for something like the following?

> **[Metrics API - Metric expressions](https://docs.dynatrace.com/managed/dynatrace-api/environment-api/metric-v2/metric-expressions)**
>
> Use metric expressions to apply arithmetic operations in a data points query via the Metrics API v2.

BR

---

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [June 4, 2025, 2:31pm UTC](https://community.dynatrace.com/t/combining-timeseries-can-this-be-done/51937/3 "2025-06-04T14:31:04Z")

</div>

Hello Theodore,

Thanks for you answer, yes this is wat I like to see… But here comes then but (sorry) I want to see this in DQL so I can use the result in a Dashboard GenV3,

KR Henk

---

<div class="post-metadata">

**Author:** ![Theodore\_x86](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/theodore_x86/32/17620_2.png) [@Theodore\_x86](https://community.dynatrace.com/u/Theodore_x86)\
**Post date:** [June 4, 2025, 2:42pm UTC](https://community.dynatrace.com/t/combining-timeseries-can-this-be-done/51937/4 "2025-06-04T14:42:00Z")

</div>

Then you have to go with this I think:

> **[Upgrade metric selectors to DQL](https://docs.dynatrace.com/docs/platform/upgrade/preserve-metrics-and-service-visibility/metrics/metric-selector-conversion)**
>
> Upgrade Classic metric selectors to DQL with Metrics on Grail with automatic or manual conversion, and find common Grail equivalents for classic metrics.

---

<div class="post-metadata">

**Author:** ![krzysztof\_hoja](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/krzysztof_hoja/32/34625_2.png) [@krzysztof\_hoja](https://community.dynatrace.com/u/krzysztof_hoja)\
**Post date:** [June 4, 2025, 7:59pm UTC](https://community.dynatrace.com/t/combining-timeseries-can-this-be-done/51937/5 "2025-06-04T19:59:58Z")

</div>

The concept is called “iterative expressions”

There are few examples on DQL for Metrics page like this one:&nbsp;[DQL timeseries examples for Metrics — Dynatrace Docs](https://docs.dynatrace.com/docs/analyze-explore-automate/metrics/dql-examples#example-9-connection-failure-rate-by-host)

e.g.

```markup
timeseries {
      new = sum(dt.process.network.sessions.new),
      {reset = sum(dt.process.network.sessions.reset), default:0},
      {timeout = sum(dt.process.network.sessions.timeout), default:0}
    },
    by:{dt.entity.host}
| fieldsAdd result = 100 * (reset[] + timeout[]) / new[]

```

more details in dedicated section:

> **[DQL operators](https://docs.dynatrace.com/docs/platform/grail/dynatrace-query-language/operators)**
>
> A list of DQL Operators.

---

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [June 4, 2025, 9:34pm UTC](https://community.dynatrace.com/t/combining-timeseries-can-this-be-done/51937/6 "2025-06-04T21:34:23Z")

</div>

Hi Krysztof,

You are absolutely right, thanks,

KR Henk
