<?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: How to calculate a ratio between two metrics in Dynatrace SaaS Dashboards (DQL)? in Dashboarding</title>
    <link>https://community.dynatrace.com/t5/Dashboarding/How-to-calculate-a-ratio-between-two-metrics-in-Dynatrace-SaaS/m-p/281448#M5205</link>
    <description>&lt;P&gt;Yes, thank you for the help, the solution u gave is a great start to have.&lt;/P&gt;</description>
    <pubDate>Mon, 14 Jul 2025 03:45:39 GMT</pubDate>
    <dc:creator>Irdina</dc:creator>
    <dc:date>2025-07-14T03:45:39Z</dc:date>
    <item>
      <title>How to calculate a ratio between two metrics in Dynatrace SaaS Dashboards (DQL)?</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/How-to-calculate-a-ratio-between-two-metrics-in-Dynatrace-SaaS/m-p/281437#M5203</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&lt;BR /&gt;I'm new to Dynatrace and DQL, and I’d appreciate some advice. I'd like to calculate a ratio between two metrics (avg(read_time) / avg(write_time)) and display it as a single value in the Dynatrace SaaS Dashboards App.&lt;/P&gt;&lt;P&gt;Is this possible, and what’s the correct way to do it?&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Sat, 12 Jul 2025 06:33:54 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/How-to-calculate-a-ratio-between-two-metrics-in-Dynatrace-SaaS/m-p/281437#M5203</guid>
      <dc:creator>Irdina</dc:creator>
      <dc:date>2025-07-12T06:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate a ratio between two metrics in Dynatrace SaaS Dashboards (DQL)?</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/How-to-calculate-a-ratio-between-two-metrics-in-Dynatrace-SaaS/m-p/281445#M5204</link>
      <description>&lt;P&gt;Hi Irdina,&lt;/P&gt;&lt;P&gt;Please try this DQL and see if this is what you are trying to achieve:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;This is a time series showing the&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;ratio of average disk write time to average disk read time&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;over time, with the intermediate metrics removed for clarity.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;timeseries { write_time = avg(dt.host.disk.write_time), read_time = avg(dt.host.disk.read_time) }
| fieldsAdd expression = write_time[] / read_time[]
| fieldsRemove write_time, read_time&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Jul 2025 19:59:00 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/How-to-calculate-a-ratio-between-two-metrics-in-Dynatrace-SaaS/m-p/281445#M5204</guid>
      <dc:creator>Emm4nuel</dc:creator>
      <dc:date>2025-07-12T19:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate a ratio between two metrics in Dynatrace SaaS Dashboards (DQL)?</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/How-to-calculate-a-ratio-between-two-metrics-in-Dynatrace-SaaS/m-p/281448#M5205</link>
      <description>&lt;P&gt;Yes, thank you for the help, the solution u gave is a great start to have.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jul 2025 03:45:39 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/How-to-calculate-a-ratio-between-two-metrics-in-Dynatrace-SaaS/m-p/281448#M5205</guid>
      <dc:creator>Irdina</dc:creator>
      <dc:date>2025-07-14T03:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate a ratio between two metrics in Dynatrace SaaS Dashboards (DQL)?</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/How-to-calculate-a-ratio-between-two-metrics-in-Dynatrace-SaaS/m-p/281449#M5206</link>
      <description>&lt;P&gt;Current update:&lt;BR /&gt;__________________________&lt;BR /&gt;timeseries {&lt;BR /&gt;write_time = avg(dt.host.disk.write_time),&lt;BR /&gt;read_time = avg(dt.host.disk.read_time)&lt;BR /&gt;}&lt;BR /&gt;| fieldsAdd wt = arrayAvg(write_time), rt = arrayAvg(read_time)&lt;BR /&gt;| fieldsAdd ratio = concat(tostring(toLong(wt)), ":", tostring(toLong(rt)))&lt;BR /&gt;| fieldsKeep ratio&lt;BR /&gt;_____________________&lt;BR /&gt;I extended the logic to convert the metric outputs into scalar values suitable for a single value tile. I also included a string-based ratio format&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jul 2025 03:47:17 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/How-to-calculate-a-ratio-between-two-metrics-in-Dynatrace-SaaS/m-p/281449#M5206</guid>
      <dc:creator>Irdina</dc:creator>
      <dc:date>2025-07-14T03:47:17Z</dc:date>
    </item>
  </channel>
</rss>

