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
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
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?
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.
When I am trying to build a segment, I saw the link to documentation as shown in screenshot
The link points to the page Filter field — Dynatrace Docs
So this is kind of confusing as the documentation link mentions the operator ‘in’.
Hi @kumaravel,
did you manage to solve this one?
Hi @GosiaMurawska ,
I checked today and seems the option is now available to use the ‘in’ operator. Later will try to implement my use case. Thanks