<?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 Can I use double aggregation (sum → percentile) in Dynatrace Metric Selector? in Open Q&amp;A</title>
    <link>https://community.dynatrace.com/t5/Open-Q-A/Can-I-use-double-aggregation-sum-percentile-in-Dynatrace-Metric/m-p/290389#M38094</link>
    <description>&lt;P&gt;Hi Everyone&lt;/P&gt;&lt;P&gt;i have a custom metric and each data point represents the duration of a single activity/phase within a workflow. A workflow consists of multiple phases.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;Workflow 1 phases: 1 ms, 2 ms, 30 ms, 10 s → total workflow duration = 10,033 ms&lt;/P&gt;&lt;P&gt;Workflow 2 phases: 2 ms, 3 ms, 15 ms, 10 s → total workflow duration = 10,020 ms&lt;/P&gt;&lt;P&gt;I want to calculate the median of total workflow durations (p50).&lt;BR /&gt;That is, first sum all phases for each workflow, then take the median across workflows.&lt;/P&gt;&lt;P&gt;I can currently get the sum of phases per workflow using:&lt;BR /&gt;&lt;BR /&gt;tenant.workflow.phases.latency.count&lt;BR /&gt;:filter(eq("operation", "ONBOARD"))&lt;BR /&gt;:splitBy("workflow_id")&lt;BR /&gt;:fold(sum)&lt;/P&gt;&lt;P&gt;This gives me workflow_id + total duration.&lt;/P&gt;&lt;P&gt;Is there a way to apply percentile (e.g., p50) on this folded result using Metric Selector syntax(because DQL is not available on my dynatrace instance probably) , essentially doing a double aggregation (sum → percentile) in a single metric selector?&lt;/P&gt;&lt;P&gt;I’ve tried things like:&lt;BR /&gt;:fold(sum):percentile(50)&lt;BR /&gt;but it results in a syntax error&amp;nbsp;&lt;BR /&gt;Illegal transform operator: Found unsupported aggregation :percentile(50)&lt;BR /&gt;&lt;BR /&gt;would like to know if what i am trying to do is possible using metric selector query ? any suggestions would be appreciated&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Nov 2025 12:04:37 GMT</pubDate>
    <dc:creator>sachins0412</dc:creator>
    <dc:date>2025-11-27T12:04:37Z</dc:date>
    <item>
      <title>Can I use double aggregation (sum → percentile) in Dynatrace Metric Selector?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Can-I-use-double-aggregation-sum-percentile-in-Dynatrace-Metric/m-p/290389#M38094</link>
      <description>&lt;P&gt;Hi Everyone&lt;/P&gt;&lt;P&gt;i have a custom metric and each data point represents the duration of a single activity/phase within a workflow. A workflow consists of multiple phases.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;Workflow 1 phases: 1 ms, 2 ms, 30 ms, 10 s → total workflow duration = 10,033 ms&lt;/P&gt;&lt;P&gt;Workflow 2 phases: 2 ms, 3 ms, 15 ms, 10 s → total workflow duration = 10,020 ms&lt;/P&gt;&lt;P&gt;I want to calculate the median of total workflow durations (p50).&lt;BR /&gt;That is, first sum all phases for each workflow, then take the median across workflows.&lt;/P&gt;&lt;P&gt;I can currently get the sum of phases per workflow using:&lt;BR /&gt;&lt;BR /&gt;tenant.workflow.phases.latency.count&lt;BR /&gt;:filter(eq("operation", "ONBOARD"))&lt;BR /&gt;:splitBy("workflow_id")&lt;BR /&gt;:fold(sum)&lt;/P&gt;&lt;P&gt;This gives me workflow_id + total duration.&lt;/P&gt;&lt;P&gt;Is there a way to apply percentile (e.g., p50) on this folded result using Metric Selector syntax(because DQL is not available on my dynatrace instance probably) , essentially doing a double aggregation (sum → percentile) in a single metric selector?&lt;/P&gt;&lt;P&gt;I’ve tried things like:&lt;BR /&gt;:fold(sum):percentile(50)&lt;BR /&gt;but it results in a syntax error&amp;nbsp;&lt;BR /&gt;Illegal transform operator: Found unsupported aggregation :percentile(50)&lt;BR /&gt;&lt;BR /&gt;would like to know if what i am trying to do is possible using metric selector query ? any suggestions would be appreciated&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Nov 2025 12:04:37 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Can-I-use-double-aggregation-sum-percentile-in-Dynatrace-Metric/m-p/290389#M38094</guid>
      <dc:creator>sachins0412</dc:creator>
      <dc:date>2025-11-27T12:04:37Z</dc:date>
    </item>
  </channel>
</rss>

