<?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 add metrics, some of which may be null? in Open Q&amp;A</title>
    <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-add-metrics-some-of-which-may-be-null/m-p/182252#M20172</link>
    <description>&lt;P&gt;Hi, I am trying to us splitby(), but still get the empty warning which does not allow me to proceed this calculation&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;calc:apps.web._AAAA:splitBy():count:auto:sort(value(avg,descending)) - (calc:apps.web._BBBB:splitBy():count:auto:sort(value(avg,descending)))&amp;nbsp; &amp;nbsp;metric BBBB is the one which has "no data" at some point of time, but I want to leave it as 0 if there is no data&lt;/P&gt;</description>
    <pubDate>Thu, 10 Mar 2022 15:51:40 GMT</pubDate>
    <dc:creator>ruofei_wang</dc:creator>
    <dc:date>2022-03-10T15:51:40Z</dc:date>
    <item>
      <title>How to add metrics, some of which may be null?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-add-metrics-some-of-which-may-be-null/m-p/178412#M19553</link>
      <description>&lt;P&gt;Hello, I am trying to build some queries that will add multiple metrics together for single value visualizations. The issue is some of these metrics could potentially be empty but are expected to eventually have data. I'm having trouble finding a way to ignore or set defaults to those empty metrics from the total addition aggregation, which breaks the entire query.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As an example, assume you are consuming DDU metrics, but not DDU logs (at the moment, but plan to). If I wanted to have a visualization of total DDU consumption, I'd try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;(builtin:billing.ddu.log.total)+(builtin:billing.ddu.metrics.total):auto:sort(value(sum,descending))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And due to ddu.log.total (at the moment) being empty, the entire query with the error out with:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"&lt;SPAN&gt;Result of metric expression was empty because one of the inputs was empty. `(builtin:billing.ddu.log.total)` was empty but `(builtin:billing.ddu.metrics.total):auto:sort(value(sum,descending))` had 1 dimension tuples.&lt;/SPAN&gt;"&lt;/P&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=""&gt;I have tried using the&amp;nbsp;&lt;STRONG&gt;default&lt;/STRONG&gt; transformation, but I get this error when adding it to any part of the query:&lt;/DIV&gt;
&lt;DIV class=""&gt;&lt;SPAN&gt;"Illegal transform operator: Usage of default operator is only supported for resolutions other than `Inf`."&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 19 Oct 2022 13:10:04 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-add-metrics-some-of-which-may-be-null/m-p/178412#M19553</guid>
      <dc:creator>bryceamacker</dc:creator>
      <dc:date>2022-10-19T13:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to add metrics, some of which may be null?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-add-metrics-some-of-which-may-be-null/m-p/178413#M19554</link>
      <description>&lt;P&gt;try&amp;nbsp;&lt;SPAN&gt;(builtin:billing.ddu.metrics.total):default(&lt;STRONG&gt;0&lt;/STRONG&gt;)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jan 2022 16:41:59 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-add-metrics-some-of-which-may-be-null/m-p/178413#M19554</guid>
      <dc:creator>AgniLanka</dc:creator>
      <dc:date>2022-01-06T16:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to add metrics, some of which may be null?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-add-metrics-some-of-which-may-be-null/m-p/178415#M19555</link>
      <description>&lt;P&gt;Unfortunately I get the error:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;"Illegal transform operator: Usage of default operator is only supported for resolutions other than `Inf`."&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bryceamacker_0-1641487488728.png" style="width: 839px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/3939i8EF8FB352F9888D0/image-dimensions/839x234?v=v2" width="839" height="234" role="button" title="bryceamacker_0-1641487488728.png" alt="bryceamacker_0-1641487488728.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jan 2022 16:45:26 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-add-metrics-some-of-which-may-be-null/m-p/178415#M19555</guid>
      <dc:creator>bryceamacker</dc:creator>
      <dc:date>2022-01-06T16:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to add metrics, some of which may be null?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-add-metrics-some-of-which-may-be-null/m-p/178869#M19653</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/45824"&gt;@bryceamacker&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Please try rather this way :&amp;nbsp;&lt;BR /&gt;(builtin:billing.ddu.metrics.total:splitBy():sum:auto:sort(value(sum,descending)))+(builtin:billing.ddu.log.total:splitBy():sum:auto:sort(value(sum,descending)))&lt;BR /&gt;&lt;BR /&gt;given that splitby() allow to rid of dimensions and return accurate value from targeted metric.&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 09:32:10 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-add-metrics-some-of-which-may-be-null/m-p/178869#M19653</guid>
      <dc:creator>uros_djukic1</dc:creator>
      <dc:date>2022-01-19T09:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to add metrics, some of which may be null?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-add-metrics-some-of-which-may-be-null/m-p/182252#M20172</link>
      <description>&lt;P&gt;Hi, I am trying to us splitby(), but still get the empty warning which does not allow me to proceed this calculation&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;calc:apps.web._AAAA:splitBy():count:auto:sort(value(avg,descending)) - (calc:apps.web._BBBB:splitBy():count:auto:sort(value(avg,descending)))&amp;nbsp; &amp;nbsp;metric BBBB is the one which has "no data" at some point of time, but I want to leave it as 0 if there is no data&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 15:51:40 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-add-metrics-some-of-which-may-be-null/m-p/182252#M20172</guid>
      <dc:creator>ruofei_wang</dc:creator>
      <dc:date>2022-03-10T15:51:40Z</dc:date>
    </item>
  </channel>
</rss>

