<?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 do I merge DQL queries together? in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/How-do-I-merge-DQL-queries-together/m-p/275851#M1986</link>
    <description>&lt;P&gt;You could either do a &lt;A href="https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-query-language/commands/correlation-and-join-commands#lookup" target="_blank" rel="noopener"&gt;lookup:&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries { percent = avg(dt.host.disk.used.percent), used = avg(dt.host.disk.used), avail = avg(dt.host.disk.avail) }, by: { dt.entity.host, dt.entity.disk }
| fieldsAdd Utilisation = arrayAvg(percent)
| fieldsAdd entityName(dt.entity.host)
| lookup [ fetch dt.entity.host 
| fields entity.name, id, tags ], sourceField:dt.entity.host, lookupField:id&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or use the &lt;A href="https://docs.dynatrace.com/docs/shortlink/general-functions#entity-attr" target="_blank" rel="noopener"&gt;entityAttr&lt;/A&gt;:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries { percent = avg(dt.host.disk.used.percent), used = avg(dt.host.disk.used), avail = avg(dt.host.disk.avail) }, by: { dt.entity.host, dt.entity.disk }
| fieldsAdd Utilisation = arrayAvg(percent)
| fieldsAdd entityName(dt.entity.host)
| fieldsAdd tags = entityAttr(dt.entity.host, "tags")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 24 Apr 2025 12:12:46 GMT</pubDate>
    <dc:creator>sia_h</dc:creator>
    <dc:date>2025-04-24T12:12:46Z</dc:date>
    <item>
      <title>How do I merge DQL queries together?</title>
      <link>https://community.dynatrace.com/t5/DQL/How-do-I-merge-DQL-queries-together/m-p/275828#M1984</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to return some fields from &lt;FONT face="courier new,courier"&gt;dt.entity.host&lt;/FONT&gt; as well as data from &lt;FONT face="courier new,courier"&gt;dt.host.disk.used.percent&lt;/FONT&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I try to append them, I get &lt;FONT face="courier new,courier"&gt;null&lt;/FONT&gt; values for Utilisation.&lt;/P&gt;&lt;P&gt;Here is my current DQL code:&lt;/P&gt;&lt;PRE&gt;fetch dt.entity.host&lt;BR /&gt;| fieldsAdd tags&lt;BR /&gt;| fieldsAdd entity.name&lt;BR /&gt;| expand tags&lt;BR /&gt;| append [&lt;BR /&gt;timeseries { percent = avg(dt.host.disk.used.percent), used = avg(dt.host.disk.used), avail = avg(dt.host.disk.avail) }, by: { dt.entity.host, dt.entity.disk }&lt;BR /&gt;| fieldsAdd Utilisation = arrayAvg(percent)&lt;BR /&gt;| fieldsAdd entityName(dt.entity.host)&lt;BR /&gt;]&lt;/PRE&gt;&lt;P&gt;Any ideas?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Apr 2025 08:38:36 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/How-do-I-merge-DQL-queries-together/m-p/275828#M1984</guid>
      <dc:creator>badgerfifteen</dc:creator>
      <dc:date>2025-04-24T08:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do I merge DQL queries together?</title>
      <link>https://community.dynatrace.com/t5/DQL/How-do-I-merge-DQL-queries-together/m-p/275851#M1986</link>
      <description>&lt;P&gt;You could either do a &lt;A href="https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-query-language/commands/correlation-and-join-commands#lookup" target="_blank" rel="noopener"&gt;lookup:&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries { percent = avg(dt.host.disk.used.percent), used = avg(dt.host.disk.used), avail = avg(dt.host.disk.avail) }, by: { dt.entity.host, dt.entity.disk }
| fieldsAdd Utilisation = arrayAvg(percent)
| fieldsAdd entityName(dt.entity.host)
| lookup [ fetch dt.entity.host 
| fields entity.name, id, tags ], sourceField:dt.entity.host, lookupField:id&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or use the &lt;A href="https://docs.dynatrace.com/docs/shortlink/general-functions#entity-attr" target="_blank" rel="noopener"&gt;entityAttr&lt;/A&gt;:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries { percent = avg(dt.host.disk.used.percent), used = avg(dt.host.disk.used), avail = avg(dt.host.disk.avail) }, by: { dt.entity.host, dt.entity.disk }
| fieldsAdd Utilisation = arrayAvg(percent)
| fieldsAdd entityName(dt.entity.host)
| fieldsAdd tags = entityAttr(dt.entity.host, "tags")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Apr 2025 12:12:46 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/How-do-I-merge-DQL-queries-together/m-p/275851#M1986</guid>
      <dc:creator>sia_h</dc:creator>
      <dc:date>2025-04-24T12:12:46Z</dc:date>
    </item>
  </channel>
</rss>

