<?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: Divide each value by a specific number in an array - DQL in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Divide-each-value-by-a-specific-number-in-an-array-DQL/m-p/250029#M1030</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/67521"&gt;@badgerfifteen&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;iCollectArray is the function which allows iterative operations on the Arrays in DQL.&lt;BR /&gt;In your case something like this would help&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries interval: 1d, usage = sum(dt.billing.full_stack_monitoring.usage), from: -7d, to: now()
| fieldsAdd actual_usage=iCollectArray(usage[]/100)&lt;/LI-CODE&gt;&lt;P&gt;Just dividing by 100 here to give an example.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/76275"&gt;@Maheedhar_T&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 07 Jul 2024 19:56:56 GMT</pubDate>
    <dc:creator>Maheedhar_T</dc:creator>
    <dc:date>2024-07-07T19:56:56Z</dc:date>
    <item>
      <title>Divide each value by a specific number in an array - DQL</title>
      <link>https://community.dynatrace.com/t5/DQL/Divide-each-value-by-a-specific-number-in-an-array-DQL/m-p/250028#M1029</link>
      <description>&lt;P&gt;I have the following DQL query:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries interval: 1d, usage = sum(dt.billing.full_stack_monitoring.usage), from: -7d, to: now()&lt;/LI-CODE&gt;&lt;P&gt;Essentially, what I want is to divide each value within the array by a specific amount which would then give me my costing under the DPS model.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What DQL function do I use to divide each value within an array&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jul 2024 18:05:09 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Divide-each-value-by-a-specific-number-in-an-array-DQL/m-p/250028#M1029</guid>
      <dc:creator>badgerfifteen</dc:creator>
      <dc:date>2024-07-07T18:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: Divide each value by a specific number in an array - DQL</title>
      <link>https://community.dynatrace.com/t5/DQL/Divide-each-value-by-a-specific-number-in-an-array-DQL/m-p/250029#M1030</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/67521"&gt;@badgerfifteen&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;iCollectArray is the function which allows iterative operations on the Arrays in DQL.&lt;BR /&gt;In your case something like this would help&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries interval: 1d, usage = sum(dt.billing.full_stack_monitoring.usage), from: -7d, to: now()
| fieldsAdd actual_usage=iCollectArray(usage[]/100)&lt;/LI-CODE&gt;&lt;P&gt;Just dividing by 100 here to give an example.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/76275"&gt;@Maheedhar_T&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jul 2024 19:56:56 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Divide-each-value-by-a-specific-number-in-an-array-DQL/m-p/250029#M1030</guid>
      <dc:creator>Maheedhar_T</dc:creator>
      <dc:date>2024-07-07T19:56:56Z</dc:date>
    </item>
  </channel>
</rss>

