03 Jul 2025 10:39 AM
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 reference.
Kind Regards,
Kumaravel
07 Jul 2025 09:59 AM
Hi @kumaravel
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
07 Jul 2025 10:18 AM
Hello @radek_jasinski ,
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?
07 Jul 2025 11:45 AM
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.
https://docs.dynatrace.com/docs/manage/segments/reference/segments-reference-data-types
https://docs.dynatrace.com/docs/manage/segments/reference/segments-reference-limits
07 Jul 2025 03:05 PM
When I am trying to build a segment, I saw the link to documentation as shown in screenshot
The link points to the page 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'.