# Data Explorer advance query mode

**URL:** <https://community.dynatrace.com/t/data-explorer-advance-query-mode/52584>\
**Category:** DQL\
**Tags:** dynatrace-managed, data-explorer\
**Created:** [July 22, 2025, 10:09am UTC](https://community.dynatrace.com/t/data-explorer-advance-query-mode/52584 "2025-07-22T10:09:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vijayt](https://avatars.discourse-cdn.com/v4/letter/v/e9bcb4/32.png) [@Vijayt](https://community.dynatrace.com/u/Vijayt)\
**Post date:** [July 22, 2025, 10:09am UTC](https://community.dynatrace.com/t/data-explorer-advance-query-mode/52584/1 "2025-07-22T10:09:53Z")

</div>

I want to extract the hostname that has exceeded 40% memory max in a 30-minute interval in the last 24 hours. How can we achieve this via a nested query, filter the series value to max (40)?

---

<div class="post-metadata">

**Author:** ![Emm4nuel](https://avatars.discourse-cdn.com/v4/letter/e/e9bcb4/32.png) [@Emm4nuel](https://community.dynatrace.com/u/Emm4nuel)\
**Post date:** [July 22, 2025, 12:04pm UTC](https://community.dynatrace.com/t/data-explorer-advance-query-mode/52584/2 "2025-07-22T12:04:51Z")

</div>

To achieve this behavior in Data Explorer’s advanced mode, you can use the metric selector syntax and transformations available in the Classic Metrics API. However, Data Explorer does not support all DQL features directly in advanced mode. Here’s how you can approximate the behavior:

1. **Metric Selector** : Use the metric key builtin:host.memory.usage to query memory usage.
2. **Split By** : Use splitBy(“dt.entity.host”) to group by host.
3. **Aggregation** : Use max to calculate the maximum memory usage.
4. **Filter** : Unfortunately, advanced mode does not support filtering based on aggregated values like arrayMax. You would need to apply this filter manually after exporting the data or use DQL in Notebooks or Dashboards for this functionality.
5. **Interval** : Set the interval to 30 minutes in the visualization settings.
6. **Timeframe** : Set the timeframe to the last 24 hours in the Data Explorer UI.

Example Metric Selector:

```auto
builtin:host.memory.usage:splitBy("dt.entity.host"):max

```

This will give you the maximum memory usage per host. To filter and add the host name, you would need to use DQL in Notebooks or Dashboards.

So to accomplish this you would need to use DQL:

```javascript
timeseries by:{dt.entity.host}, interval:30m, from:now() - 24h, maxMemory = max(dt.host.memory.usage)
| filter arrayMax(maxMemory) > 40
| fieldsAdd hostName = dt.entity.host

```

Execute this query on DQL and you will get what you are looking for, Does this satisfy your need? I will keep searching if we can accomplish this through Data Explorer.

---

<div class="post-metadata">

**Author:** ![Vijayt](https://avatars.discourse-cdn.com/v4/letter/v/e9bcb4/32.png) [@Vijayt](https://community.dynatrace.com/u/Vijayt)\
**Post date:** [July 22, 2025, 12:50pm UTC](https://community.dynatrace.com/t/data-explorer-advance-query-mode/52584/3 "2025-07-22T12:50:24Z")

</div>

unfortunately we have only access to dashboard classic. can it be achieved by nested query . i have seen already but forgot the syntax

---

<div class="post-metadata">

**Author:** ![Maheedhar\_T](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/maheedhar_t/32/155_2.png) [@Maheedhar\_T](https://community.dynatrace.com/u/Maheedhar_T)\
**Post date:** [July 24, 2025, 8:12pm UTC](https://community.dynatrace.com/t/data-explorer-advance-query-mode/52584/4 "2025-07-24T20:12:51Z")

</div>

Hi&nbsp;[@Vijayt](https://community.dynatrace.com/user/75656)&nbsp;,  
You can control this using the min,max at the right side when you get that nested query in Data Explorer.  
Query would still look like this only

```markup
builtin:host.mem.usage:splitBy("dt.entity.host"):sort(value(auto,descending))

```

Then from this we need to change the visualisation as highlighted in the below image.  
Then you’ll see only the hosts that are in that range.

 ![Maheedhar_T_0-1753387941850.png](https://global.discourse-cdn.com/dynatrace/original/3X/1/9/1984bf65daf8012db443a7082d47a57f0af69123.png)

Hope this helps.

Regards,  
[@Maheedhar\_T](https://community.dynatrace.com/user/76275)

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [July 25, 2025, 10:48am UTC](https://community.dynatrace.com/t/data-explorer-advance-query-mode/52584/5 "2025-07-25T10:48:07Z")

</div>

If I got your question right, with Data Explorer (no DQL), I’d suggest the following:

```markup
builtin:host.mem.usage
:max 
:partition("above40",value("yes",gt(40)),otherwise("no"))
:filter(eq("above40","yes"))
:splitBy("dt.entity.host")

```

First select the maximum in the bucket interval (:max), then add a dimension to compare if it’s over 40% (:partition) and afterward filter only those series where it’s over (:filter) and split by host.

If you need it in 30 minute buckets, you can select that option in Data Explorer.

This is [link to the playground environment](https://wkf10640.live.dynatrace.com/ui/data-explorer?gtf=-24h&gf=all#eyJ2ZXJzaW9uIjoyLCJjb25maWciOnsiYm91bmRzIjp7fSwiY29uZmlndXJlZCI6ZmFsc2UsImVkaXRhYmxlIjp0cnVlLCJuYW1lIjoiRGF0YSBleHBsb3JlciByZXN1bHRzIiwidGlsZVR5cGUiOiJEQVRBX0VYUExPUkVSIiwiY3VzdG9tTmFtZSI6IkRhdGEgZXhwbG9yZXIgcmVzdWx0cyIsInF1ZXJpZXMiOlt7ImlkIjoiQSIsImVuYWJsZWQiOnRydWUsIm1ldHJpY1NlbGVjdG9yIjoiYnVpbHRpbjpob3N0Lm1lbS51c2FnZVxuOm1heCBcbjpwYXJ0aXRpb24oXCJhYm92ZTQwXCIsdmFsdWUoXCJ5ZXNcIixndCg0MCkpLG90aGVyd2lzZShcIm5vXCIpKVxuOmZpbHRlcihlcShcImFib3ZlNDBcIixcInllc1wiKSlcbjpzcGxpdEJ5KFwiZHQuZW50aXR5Lmhvc3RcIikiLCJzcGxpdEJ5IjpbImR0LmVudGl0eS5ob3N0Il19XSwidmlzdWFsQ29uZmlnIjp7InRocmVzaG9sZHMiOlt7InZpc2libGUiOnRydWUsInJ1bGVzIjpbeyJjb2xvciI6IiM3ZGM1NDAifSx7ImNvbG9yIjoiI2Y1ZDMwZiJ9LHsiY29sb3IiOiIjZGMxNzJhIn1dfV0sImdsb2JhbCI6e30sInJ1bGVzIjpbXSwidHlwZSI6IkdSQVBIX0NIQVJUIiwiYXhlcyI6eyJ4QXhpcyI6eyJkaXNwbGF5TmFtZSI6IiIsInZpc2libGUiOnRydWV9LCJ5QXhlcyI6W3siZGlzcGxheU5hbWUiOiIiLCJ2aXNpYmxlIjp0cnVlLCJtaW4iOiJBVVRPIiwibWF4IjoiQVVUTyIsInBvc2l0aW9uIjoiTEVGVCIsInF1ZXJ5SWRzIjpbIkEiXSwiZGVmYXVsdEF4aXMiOnRydWV9XX0sImhlYXRtYXBTZXR0aW5ncyI6eyJ5QXhpcyI6IlZBTFVFIiwic2hvd0xhYmVscyI6ZmFsc2V9LCJob25leWNvbWJTZXR0aW5ncyI6eyJzaG93TGVnZW5kIjp0cnVlLCJzaG93SGl2ZSI6dHJ1ZX0sImdyYXBoQ2hhcnRTZXR0aW5ncyI6eyJjb25uZWN0TnVsbHMiOmZhbHNlfSwic2luZ2xlVmFsdWVTZXR0aW5ncyI6eyJzaG93VHJlbmQiOnRydWUsInNob3dTcGFya0xpbmUiOnRydWUsImxpbmtUaWxlQ29sb3JUb1RocmVzaG9sZCI6dHJ1ZX0sImlzVGFibGVQYWdpbmF0aW9uRW5hYmxlZCI6ZmFsc2V9LCJxdWVyaWVzU2V0dGluZ3MiOnsicmVzb2x1dGlvbiI6IjMwbSJ9LCJiYXNlbGluZUNvbmZpZ3MiOltdfX0=).

A second option is filtering by series - in this case it returns hosts where maximum usage in the selected interval is over 40%:

```markup
builtin:host.mem.usage
:auto
:filter(series(max,gt(40)))
:splitBy("dt.entity.host")

```

---

<div class="post-metadata">

**Author:** ![Vijayt](https://avatars.discourse-cdn.com/v4/letter/v/e9bcb4/32.png) [@Vijayt](https://community.dynatrace.com/u/Vijayt)\
**Post date:** [July 27, 2025, 8:10am UTC](https://community.dynatrace.com/t/data-explorer-advance-query-mode/52584/6 "2025-07-27T08:10:55Z")

</div>

this works perfectly fine //builtin:host.cpu.user:max:partition(“critical”,value(“1”,gt(60)),otherwise(“0”))  
:filter(eq(“above60”,“1”)):splitBy(“dt.entity.host”):count:sort(value(sum,descending))//

This one still shows \<40 data points not sure why //

builtin:host.mem.usage:auto:filter(series(max,gt(40))):splitBy(“dt.entity.host”)//
