# Example of 'in' operator in Segments

**URL:** <https://community.dynatrace.com/t/example-of-in-operator-in-segments/52329>\
**Category:** Open Q&A\
**Tags:** segments\
**Created:** [July 3, 2025, 9:39am UTC](https://community.dynatrace.com/t/example-of-in-operator-in-segments/52329 "2025-07-03T09:39:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kumaravel](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/kumaravel/32/41704_2.png) [@kumaravel](https://community.dynatrace.com/u/kumaravel)\
**Post date:** [July 3, 2025, 9:39am UTC](https://community.dynatrace.com/t/example-of-in-operator-in-segments/52329/1 "2025-07-03T09:39:46Z")

</div>

Hello,

I have been trying to use the ‘in’ operator to apply filters in the Segments but always get errors like “The filter field statement has to be defined” or “Segments can only filter by text. Wrap “(t)” with quotation marks.”  
Is there some working example which I could use as&nbsp; reference.

Kind Regards,

Kumaravel

---

<div class="post-metadata">

**Author:** ![radek\_jasinski](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/radek_jasinski/32/10432_2.png) [@radek\_jasinski](https://community.dynatrace.com/u/radek_jasinski)\
**Post date:** [July 7, 2025, 8:59am UTC](https://community.dynatrace.com/t/example-of-in-operator-in-segments/52329/2 "2025-07-07T08:59:50Z")

</div>

Hi&nbsp;[@kumaravel](https://community.dynatrace.com/user/87037)

Below you can find an example of how to achieve the desired filtering in DQL (since the in operator is not supported in this context) by using multiple OR conditions instead:

**fetch logs**  
**| filter dt.system.bucket == “logs\_default” OR dt.system.bucket == “logs\_archive”**  
**| fields dt.system.bucket, loglevel, content**

---

<div class="post-metadata">

**Author:** ![kumaravel](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/kumaravel/32/41704_2.png) [@kumaravel](https://community.dynatrace.com/u/kumaravel)\
**Post date:** [July 7, 2025, 9:18am UTC](https://community.dynatrace.com/t/example-of-in-operator-in-segments/52329/3 "2025-07-07T09:18:05Z")

</div>

Hello&nbsp;[@radek\_jasinski](https://community.dynatrace.com/user/16832)&nbsp;,

Thanks for your reply.

In my case, I do not have a fixed list to hardcode with OR condition and was looking for an option to work with dynamic values.

But if its not supported, then will check other possible ways to implement my usecase.

Is there any plan to include the in operator in the ‘Segments’ as well or its out of scope for some specific reason?

---

<div class="post-metadata">

**Author:** ![radek\_jasinski](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/radek_jasinski/32/10432_2.png) [@radek\_jasinski](https://community.dynatrace.com/u/radek_jasinski)\
**Post date:** [July 7, 2025, 10:45am UTC](https://community.dynatrace.com/t/example-of-in-operator-in-segments/52329/4 "2025-07-07T10:45:00Z")

</div>

I couldn’t find anything in the documentation saying that in is supported in Segments, and I just tried it myself but it didn’t work either.

> **[Supported data types in segments](https://docs.dynatrace.com/docs/manage/segments/reference/segments-reference-data-types)**
>
> Learn about data types in segments.

> **[Segment limits](https://docs.dynatrace.com/docs/manage/segments/reference/segments-reference-limits)**
>
> Learn about limits in segments.

---

<div class="post-metadata">

**Author:** ![kumaravel](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/kumaravel/32/41704_2.png) [@kumaravel](https://community.dynatrace.com/u/kumaravel)\
**Post date:** [July 7, 2025, 2:05pm UTC](https://community.dynatrace.com/t/example-of-in-operator-in-segments/52329/5 "2025-07-07T14:05:21Z")

</div>

When I am trying to build a segment, I saw the link to documentation as shown in screenshot

 ![kumaravel_0-1751897004820.png](https://global.discourse-cdn.com/dynatrace/original/3X/0/5/052919f251c8592e77672eb9018c977c231fb78c.png)

The link points to the page&nbsp;[Filter field — Dynatrace Docs](https://docs.dynatrace.com/docs/discover-dynatrace/get-started/dynatrace-ui/ui-filter-field)

So this is kind of confusing as the documentation link mentions the operator ‘in’.

---

<div class="post-metadata">

**Author:** ![Gosia\_Murawska](https://avatars.discourse-cdn.com/v4/letter/g/2bfe46/32.png) [@Gosia\_Murawska](https://community.dynatrace.com/u/Gosia_Murawska)\
**Post date:** [December 23, 2025, 3:16pm UTC](https://community.dynatrace.com/t/example-of-in-operator-in-segments/52329/6 "2025-12-23T15:16:07Z")

</div>

Hi&nbsp;[@kumaravel](https://community.dynatrace.com/user/87037),&nbsp;  
did you manage to solve this one?

---

<div class="post-metadata">

**Author:** ![kumaravel](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/kumaravel/32/41704_2.png) [@kumaravel](https://community.dynatrace.com/u/kumaravel)\
**Post date:** [December 23, 2025, 3:49pm UTC](https://community.dynatrace.com/t/example-of-in-operator-in-segments/52329/7 "2025-12-23T15:49:13Z")

</div>

Hi&nbsp;[@GosiaMurawska](https://community.dynatrace.com/user/77704)&nbsp;,

I checked today and seems the option is now available to use the ‘in’ operator. Later will try to implement my use case. Thanks
