# Filter HTTP response code range

**URL:** <https://community.dynatrace.com/t/filter-http-response-code-range/53347>\
**Category:** Open Q&A\
**Tags:** services\
**Created:** [September 15, 2025, 1:27pm UTC](https://community.dynatrace.com/t/filter-http-response-code-range/53347 "2025-09-15T13:27:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![avdveen](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@avdveen](https://community.dynatrace.com/u/avdveen)\
**Post date:** [September 15, 2025, 1:27pm UTC](https://community.dynatrace.com/t/filter-http-response-code-range/53347/1 "2025-09-15T13:27:00Z")

</div>

Hello

How do I filter for a range of response codes e.g., 400-499, 500-599 for a specific service?  
I’ve tried the below but it doesn’t seem to work, it brings back status codes for other services too, not just the one I selected. The below is built up when I select 400-499 and 500-599:

![andre_vdveen_0-1757942695029.png](https://global.discourse-cdn.com/dynatrace/optimized/2X/c/c2f242617f38b7452ccbb3816c777182a733cd9f_2_690x31.png)

---

<div class="post-metadata">

**Author:** ![michiel\_otten](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/michiel_otten/32/21987_2.png) [@michiel\_otten](https://community.dynatrace.com/u/michiel_otten)\
**Post date:** [September 15, 2025, 2:21pm UTC](https://community.dynatrace.com/t/filter-http-response-code-range/53347/2 "2025-09-15T14:21:46Z")

</div>

Hi Andre,

The OR statement is probably causing this. Could you try:

 ![michiel_otten_0-1757946099874.png](https://global.discourse-cdn.com/dynatrace/original/3X/a/f/af058801bca4043154fd801456081644a5226414.png)

---

<div class="post-metadata">

**Author:** ![avdveen](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@avdveen](https://community.dynatrace.com/u/avdveen)\
**Post date:** [September 15, 2025, 5:26pm UTC](https://community.dynatrace.com/t/filter-http-response-code-range/53347/3 "2025-09-15T17:26:29Z")

</div>

Thanks&nbsp;[@michiel\_otten](https://community.dynatrace.com/user/4669), you’re right, there were too many AND / OR in that original filter. This ended up giving me the correct results:

```auto
Service = "service_name" "HTTP status" >= 400 AND "HTTP status" <= 499 OR Service = "service_name" "HTTP status" >= 500 AND "HTTP status" <= 599

```
