<?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: DQL query to replace null values into an integer in a array in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/DQL-query-to-replace-null-values-into-an-integer-in-a-array/m-p/262479#M1436</link>
    <description>&lt;P&gt;Can you try this? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;timeseries requests = avg(dt.synthetic.http.request.executions),&lt;BR /&gt;filter: { http_monitor.result.http_status.code == 200 AND matchesValue(entityAttr(dt.entity.http_check_step, "entity.name"), "test-monitor") }&lt;BR /&gt;| fieldsAdd requests =if(isNull(requests[]),0,else:requests[])&lt;/P&gt;&lt;P&gt;| fieldsAdd final=if(arrayLast(requests)==1, "UP", else: "DOWN")&lt;/P&gt;</description>
    <pubDate>Thu, 14 Nov 2024 15:08:59 GMT</pubDate>
    <dc:creator>marina_pollehn</dc:creator>
    <dc:date>2024-11-14T15:08:59Z</dc:date>
    <item>
      <title>DQL query to replace null values into an integer in a array</title>
      <link>https://community.dynatrace.com/t5/DQL/DQL-query-to-replace-null-values-into-an-integer-in-a-array/m-p/262444#M1435</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I'm using single synthetic monitoring configuration where I have configured 3 http requests and I would like to monitor all 3 http url in a dashboard. If any http url receives status code other than 200 then it should fail.&lt;/P&gt;&lt;P&gt;I use below DQL query to fetch the metrics, the average value &lt;STRONG&gt;dt.synthetic.http.request.executions&lt;/STRONG&gt; comes 1 if there is a success and gives null when it fails.&lt;/P&gt;&lt;P&gt;When I try to fetch arraylast() value, DQL ignores all null values and picks latest numerical value from an array. Is there a function to change null values into numerical value i.e 0 so that I can pick that value and mark my application down.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;timeseries requests = avg(dt.synthetic.http.request.executions), &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;filter: { http_monitor.result.http_status.code == 200 AND matchesValue(entityAttr(dt.entity.http_check_step, "entity.name"), "test-monitor") }&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| fieldsAdd final=if(arrayLast(requests)==1, "UP", else: "DOWN")&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 13:33:29 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/DQL-query-to-replace-null-values-into-an-integer-in-a-array/m-p/262444#M1435</guid>
      <dc:creator>Elumalai</dc:creator>
      <dc:date>2024-11-14T13:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: DQL query to replace null values into an integer in a array</title>
      <link>https://community.dynatrace.com/t5/DQL/DQL-query-to-replace-null-values-into-an-integer-in-a-array/m-p/262479#M1436</link>
      <description>&lt;P&gt;Can you try this? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;timeseries requests = avg(dt.synthetic.http.request.executions),&lt;BR /&gt;filter: { http_monitor.result.http_status.code == 200 AND matchesValue(entityAttr(dt.entity.http_check_step, "entity.name"), "test-monitor") }&lt;BR /&gt;| fieldsAdd requests =if(isNull(requests[]),0,else:requests[])&lt;/P&gt;&lt;P&gt;| fieldsAdd final=if(arrayLast(requests)==1, "UP", else: "DOWN")&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 15:08:59 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/DQL-query-to-replace-null-values-into-an-integer-in-a-array/m-p/262479#M1436</guid>
      <dc:creator>marina_pollehn</dc:creator>
      <dc:date>2024-11-14T15:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: DQL query to replace null values into an integer in a array</title>
      <link>https://community.dynatrace.com/t5/DQL/DQL-query-to-replace-null-values-into-an-integer-in-a-array/m-p/262498#M1437</link>
      <description>&lt;P&gt;This works, much appreciated&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 16:20:23 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/DQL-query-to-replace-null-values-into-an-integer-in-a-array/m-p/262498#M1437</guid>
      <dc:creator>Elumalai</dc:creator>
      <dc:date>2024-11-14T16:20:23Z</dc:date>
    </item>
  </channel>
</rss>

