<?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 DQL if no records returned i want to show in honeycomb view as 0 in Open Q&amp;A</title>
    <link>https://community.dynatrace.com/t5/Open-Q-A/DQL-if-no-records-returned-i-want-to-show-in-honeycomb-view-as-0/m-p/299128#M39007</link>
    <description>&lt;P&gt;timeseries { cpu_usage_percent = avg(dt.host.cpu.usage) }, by:{ dt.entity.host }, nonempty:true&lt;BR /&gt;| fieldsAdd hostname = entityName(dt.entity.host)&lt;BR /&gt;| filter in(hostname, $DEVICENAME) // optional: filter by a list variable&lt;BR /&gt;| fieldsAdd `% usage` = arrayLast(cpu_usage_percent)&lt;BR /&gt;| fieldsAdd output = if((`% usage` &amp;gt; 90), `% usage`, else: 0)&lt;BR /&gt;| summarize `Usage &amp;gt; 90%` = sum(output), by: {dt.entity.host}&lt;BR /&gt;| fields `Usage &amp;gt; 90%`, entityName(dt.entity.host)&lt;BR /&gt;| filterOut `Usage &amp;gt; 90%` &amp;lt; 90&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If there is no record returned (If there are no hosts with CPU usage greater than 90%) then instead of displaying as No records, adjust timeframe default message, I want it to show as 0 and as honeycomb view.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to achieve it, help with modified query&lt;/P&gt;</description>
    <pubDate>Wed, 06 May 2026 17:36:45 GMT</pubDate>
    <dc:creator>learndt</dc:creator>
    <dc:date>2026-05-06T17:36:45Z</dc:date>
    <item>
      <title>DQL if no records returned i want to show in honeycomb view as 0</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/DQL-if-no-records-returned-i-want-to-show-in-honeycomb-view-as-0/m-p/299128#M39007</link>
      <description>&lt;P&gt;timeseries { cpu_usage_percent = avg(dt.host.cpu.usage) }, by:{ dt.entity.host }, nonempty:true&lt;BR /&gt;| fieldsAdd hostname = entityName(dt.entity.host)&lt;BR /&gt;| filter in(hostname, $DEVICENAME) // optional: filter by a list variable&lt;BR /&gt;| fieldsAdd `% usage` = arrayLast(cpu_usage_percent)&lt;BR /&gt;| fieldsAdd output = if((`% usage` &amp;gt; 90), `% usage`, else: 0)&lt;BR /&gt;| summarize `Usage &amp;gt; 90%` = sum(output), by: {dt.entity.host}&lt;BR /&gt;| fields `Usage &amp;gt; 90%`, entityName(dt.entity.host)&lt;BR /&gt;| filterOut `Usage &amp;gt; 90%` &amp;lt; 90&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If there is no record returned (If there are no hosts with CPU usage greater than 90%) then instead of displaying as No records, adjust timeframe default message, I want it to show as 0 and as honeycomb view.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to achieve it, help with modified query&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2026 17:36:45 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/DQL-if-no-records-returned-i-want-to-show-in-honeycomb-view-as-0/m-p/299128#M39007</guid>
      <dc:creator>learndt</dc:creator>
      <dc:date>2026-05-06T17:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: DQL if no records returned i want to show in honeycomb view as 0</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/DQL-if-no-records-returned-i-want-to-show-in-honeycomb-view-as-0/m-p/299132#M39008</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/99239"&gt;@learndt&lt;/a&gt;!&lt;/P&gt;&lt;P&gt;If think you want this below:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;timeseries cpu_usage_percent = avg(dt.host.cpu.usage),
  by:{ dt.entity.host },
  nonempty:true
| fieldsAdd hostname = entityName(dt.entity.host)
| filter in(hostname, $DEVICENAME)
| fieldsAdd `% usage` = arrayLast(cpu_usage_percent)
| filter `% usage` &amp;gt; 90
| summarize `Usage &amp;gt; 90%` = count()
| fieldsAdd label = "Hosts with CPU &amp;gt; 90%"
| fields label, `Usage &amp;gt; 90%`&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I hope it helps&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2026 18:38:54 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/DQL-if-no-records-returned-i-want-to-show-in-honeycomb-view-as-0/m-p/299132#M39008</guid>
      <dc:creator>MaximilianoML</dc:creator>
      <dc:date>2026-05-06T18:38:54Z</dc:date>
    </item>
  </channel>
</rss>

