# DQL filtering and grouping by Request Attributes

**URL:** <https://community.dynatrace.com/t/dql-filtering-and-grouping-by-request-attributes/53872>\
**Category:** DQL\
**Tags:** dql, dynatrace-managed, request-attributes\
**Created:** [October 27, 2025, 12:18pm UTC](https://community.dynatrace.com/t/dql-filtering-and-grouping-by-request-attributes/53872 "2025-10-27T12:18:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![D\_Miller](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/d_miller/32/22229_2.png) [@D\_Miller](https://community.dynatrace.com/u/D_Miller)\
**Post date:** [October 27, 2025, 12:18pm UTC](https://community.dynatrace.com/t/dql-filtering-and-grouping-by-request-attributes/53872/1 "2025-10-27T12:18:45Z")

</div>

I have a Service request that applies a Request Attribute (RA) to the Request if it has been attempted more than once (The number set in the RA will increase if attempted further).

RA.retry\_count

On that request there is also a RA for a correlation\_id so the repeated attempts can be grouped.

RA.Correlation\_id

Does anyone have a good example of any DQL that can allow me to filter on&nbsp;RA.retry\_count being \>= 3

Thanks in advance

---

<div class="post-metadata">

**Author:** ![anapaulasalas](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@anapaulasalas](https://community.dynatrace.com/u/anapaulasalas)\
**Post date:** [December 2, 2025, 9:01pm UTC](https://community.dynatrace.com/t/dql-filtering-and-grouping-by-request-attributes/53872/2 "2025-12-02T21:01:26Z")

</div>

Hello!

You could try something like this:

fetch spans  
| filter isNotNull(request\_attribute.retry\_count)  
|fieldsAdd request\_attribute.retry\_count, request\_attribute.Correlation\_id&nbsp;  
|filter request\_attribute.retry\_count&nbsp;\>= 3

Hope this helps!!

---

<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:** [December 3, 2025, 7:06pm UTC](https://community.dynatrace.com/t/dql-filtering-and-grouping-by-request-attributes/53872/3 "2025-12-03T19:06:14Z")

</div>

This actually works! Thanks!
