<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Is it possible to multiply 2 arrays in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Is-it-possible-to-multiply-2-arrays/m-p/289543#M2757</link>
    <description>&lt;P&gt;This actually also worked - so I think I will prefer this solution, as I then can keep working with my metric &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Nov 2025 14:11:45 GMT</pubDate>
    <dc:creator>AndersB</dc:creator>
    <dc:date>2025-11-13T14:11:45Z</dc:date>
    <item>
      <title>Is it possible to multiply 2 arrays</title>
      <link>https://community.dynatrace.com/t5/DQL/Is-it-possible-to-multiply-2-arrays/m-p/289518#M2753</link>
      <description>&lt;P&gt;I‘m trying to build a timeseries which can be used to trigger an alert if too many emails are bouncing.&lt;/P&gt;
&lt;P&gt;I’m able to create both a bounce rate timeseries, and also a timeseries with number of mails delivered – based on 15 minutes intervals.&lt;/P&gt;
&lt;P&gt;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&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Interval a) 15% bounced mails – 100 mails send = weight = 15&lt;/P&gt;
&lt;P&gt;Interval b) 100% bounced mails – 1 mail send = weight = 1&lt;/P&gt;
&lt;P&gt;Interval 3) 2% bounced mails – 1000 mails send = weight = 20&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;So in principle “just” a way to multiple the two timeseries.&lt;/P&gt;
&lt;P&gt;timeseries&amp;nbsp; `Bounce Rate`= avg(log. EmailBounced),`Count`= count(log. EmailBounced), filter:Incoming == false, interval:15m&lt;/P&gt;
&lt;P&gt;| fieldsAdd Weight=`Bounce Rate`*Count (is failing because it’s not allowed to multiple arrays)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this possible at all – or do I need to look in a different direction?&lt;/P&gt;</description>
      <pubDate>Mon, 17 Nov 2025 11:29:48 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Is-it-possible-to-multiply-2-arrays/m-p/289518#M2753</guid>
      <dc:creator>AndersB</dc:creator>
      <dc:date>2025-11-17T11:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to multiply 2 arrays</title>
      <link>https://community.dynatrace.com/t5/DQL/Is-it-possible-to-multiply-2-arrays/m-p/289523#M2754</link>
      <description>&lt;P&gt;Hi! By any chance, have you tried it this way?&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;| fieldsAdd Weight = `Bounce Rate`[] * rate[]&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 13 Nov 2025 12:22:22 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Is-it-possible-to-multiply-2-arrays/m-p/289523#M2754</guid>
      <dc:creator>tracegazer</dc:creator>
      <dc:date>2025-11-13T12:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to multiply 2 arrays</title>
      <link>https://community.dynatrace.com/t5/DQL/Is-it-possible-to-multiply-2-arrays/m-p/289526#M2755</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;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.&lt;/P&gt;&lt;P&gt;But for this use case IMO&amp;nbsp;you don’t really need to multiply two series. If EmailBounced is 1 for a bounced email and 0 otherwise, then:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;BounceRate = bounced / sent&lt;/LI&gt;&lt;LI&gt;Count = sent&lt;/LI&gt;&lt;LI&gt;Weight = BounceRate * Count = bounced.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;You can compute everything with a simple summarize over 15-minute buckets, for example:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;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&lt;/LI-CODE&gt;&lt;P&gt;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&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Nov 2025 12:25:39 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Is-it-possible-to-multiply-2-arrays/m-p/289526#M2755</guid>
      <dc:creator>t_pawlak</dc:creator>
      <dc:date>2025-11-13T12:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to multiply 2 arrays</title>
      <link>https://community.dynatrace.com/t5/DQL/Is-it-possible-to-multiply-2-arrays/m-p/289533#M2756</link>
      <description>&lt;P&gt;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!&lt;BR /&gt;&lt;BR /&gt;(and just for the record - the Weight variable should IMHO be calculated like this - but that's just a minor detail)&lt;BR /&gt;Weight = BounceRate * Sent /100&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Nov 2025 14:05:51 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Is-it-possible-to-multiply-2-arrays/m-p/289533#M2756</guid>
      <dc:creator>AndersB</dc:creator>
      <dc:date>2025-11-13T14:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to multiply 2 arrays</title>
      <link>https://community.dynatrace.com/t5/DQL/Is-it-possible-to-multiply-2-arrays/m-p/289543#M2757</link>
      <description>&lt;P&gt;This actually also worked - so I think I will prefer this solution, as I then can keep working with my metric &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Nov 2025 14:11:45 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Is-it-possible-to-multiply-2-arrays/m-p/289543#M2757</guid>
      <dc:creator>AndersB</dc:creator>
      <dc:date>2025-11-13T14:11:45Z</dc:date>
    </item>
  </channel>
</rss>

