Inconsistent XQL search results

Showing results for 
Search instead for 
Did you mean: 

Inconsistent XQL search results

L0 Member

When carrying out XQL search...."dataset = xdr_data | fields action_country | dedup action_country"

I receive a set of results with different action_country values as expected.

If I then take one of these values ie Switzerland and run "dataset = xdr_data | fields action_country | filter action_country = SWITZERLAND"

I receive expected results.

If i run the same search with "dataset = xdr_data | fields action_country | filter action_country = IRAN,_ISLAMIC_REPUBLIC_OF " it will not allow me to run the search, as if the search rule is not complete. Surrounding IRAN_,ISLAMIC REPUBLIC OF in quotes allows me to carry out the search however then returns no results despite results being returned in the first search



L4 Transporter

Hi @John_Lodge ,


It would appear that the value "IRAN_,ISLAMIC REPUBLIC OF," which is a string, is not being parsed properly by XQL. Have you had the opportunity to report this to Support for review?


L4 Transporter

For anyone looking to know how this was resolved, a bug was registered for this problem which should be resolved in Cortex XDR version 2.8. As a workaround, you can use the two-letter country code to yield the same result. For example:



    dataset = xdr_data | fields action_country | dedup action_country | filter (action_country = "IR")


    dataset = xdr_data | fields action_country | dedup action_country | filter (action_country = "VG")


A list of two-letter country codes can be found here.

Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!