# Is it possible to multiply 2 arrays

**URL:** <https://community.dynatrace.com/t/is-it-possible-to-multiply-2-arrays/54075>\
**Category:** DQL\
**Tags:** dql, dynatrace-managed\
**Created:** [November 13, 2025, 11:48am UTC](https://community.dynatrace.com/t/is-it-possible-to-multiply-2-arrays/54075 "2025-11-13T11:48:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndersB](https://avatars.discourse-cdn.com/v4/letter/a/9f8e36/32.png) [@AndersB](https://community.dynatrace.com/u/AndersB)\
**Post date:** [November 13, 2025, 11:48am UTC](https://community.dynatrace.com/t/is-it-possible-to-multiply-2-arrays/54075/1 "2025-11-13T11:48:01Z")

</div>

I‘m trying to build a timeseries which can be used to trigger an alert if too many emails are bouncing.

I’m able to create both a bounce rate timeseries, and also a timeseries with number of mails delivered – based on 15 minutes intervals.

But as I don’t want the alert to go off for a single bounced email – so I need a “weighted” value to alert on - eg

Interval a) 15% bounced mails – 100 mails send = weight = 15

Interval b) 100% bounced mails – 1 mail send = weight = 1

Interval 3) 2% bounced mails – 1000 mails send = weight = 20

So in principle “just” a way to multiple the two timeseries.

timeseries&nbsp; `Bounce Rate`= avg(log. EmailBounced),`Count`= count(log. EmailBounced), filter:Incoming == false, interval:15m

| fieldsAdd Weight=`Bounce Rate`\*Count (is failing because it’s not allowed to multiple arrays)

Is this possible at all – or do I need to look in a different direction?

---

<div class="post-metadata">

**Author:** ![tracegazer](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/tracegazer/32/32785_2.png) [@tracegazer](https://community.dynatrace.com/u/tracegazer)\
**Post date:** [November 13, 2025, 12:22pm UTC](https://community.dynatrace.com/t/is-it-possible-to-multiply-2-arrays/54075/2 "2025-11-13T12:22:22Z")

</div>

Hi! By any chance, have you tried it this way?

```javascript
| fieldsAdd Weight = `Bounce Rate`[] * rate[]

```

---

<div class="post-metadata">

**Author:** ![t\_pawlak](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/t_pawlak/32/14991_2.png) [@t\_pawlak](https://community.dynatrace.com/u/t_pawlak)\
**Post date:** [November 13, 2025, 12:25pm UTC](https://community.dynatrace.com/t/is-it-possible-to-multiply-2-arrays/54075/3 "2025-11-13T12:25:39Z")

</div>

Hi,  
In DQL, timeseries and makeTimeseries produce array-like series, so multiplying two series directly (BounceRate \* Count) isn’t supported – that’s why you see the “not allowed to multiply arrays” error.

But for this use case IMO&nbsp;you don’t really need to multiply two series. If EmailBounced is 1 for a bounced email and 0 otherwise, then:

- BounceRate = bounced / sent
- Count = sent
- Weight = BounceRate \* Count = bounced.

You can compute everything with a simple summarize over 15-minute buckets, for example:

```markup
fetch logs
| filter Incoming == false
| summarize
    Sent = count(),
    Bounced = sum(log.EmailBounced),
  by: { interval_start = bin(timestamp, 15m) }
| fieldsAdd
    BounceRate = Bounced * 1.0 / Sent,   
    Weight = Bounced 
| sort interval_start asc

```

This gives you one row per 15-minute interval with Sent, Bounced, BounceRate, and your “weighted” value (Weight). You can then base your alert on Weight (for example, fire only if the number of bounced emails in a 15-minute interval exceeds a certain threshold

---

<div class="post-metadata">

**Author:** ![AndersB](https://avatars.discourse-cdn.com/v4/letter/a/9f8e36/32.png) [@AndersB](https://community.dynatrace.com/u/AndersB)\
**Post date:** [November 13, 2025, 12:51pm UTC](https://community.dynatrace.com/t/is-it-possible-to-multiply-2-arrays/54075/4 "2025-11-13T12:51:18Z")

</div>

Thanks for the help on this - I was focused on using the metric for it - but it makes sense to use the log entries instead!

(and just for the record - the Weight variable should IMHO be calculated like this - but that’s just a minor detail)  
Weight = BounceRate \* Sent /100

---

<div class="post-metadata">

**Author:** ![AndersB](https://avatars.discourse-cdn.com/v4/letter/a/9f8e36/32.png) [@AndersB](https://community.dynatrace.com/u/AndersB)\
**Post date:** [November 13, 2025, 2:11pm UTC](https://community.dynatrace.com/t/is-it-possible-to-multiply-2-arrays/54075/5 "2025-11-13T14:11:45Z")

</div>

This actually also worked - so I think I will prefer this solution, as I then can keep working with my metric 🙂
