Splunk Search

Boolean Query

aoliullah
Path Finder

Hi. The following query doesn't seem to work for me.

sourcetype="vendor_sales" VendorCountry=("United States" AND "Canada")

I want it to return sales events for both US and Canada.

Could you help?

0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi aoliullah,
try with
sourcetype="vendor_sales" (VendorCountry="United States" OR VendorCountry="Canada")
Bye.
Giuseppe

View solution in original post

woodcock
Esteemed Legend

Like this:

sourcetype="vendor_sales" VendorCountry="United States" AND VendorCountry="Canada"

But this will only show those vendors who sold both in "United States" and "Canada" in a single event (where VendorCountry is a multivalued field). But this is probably not your desire. You are probably trying to do this:

sourcetype="vendor_sales" VendorCountry="United States" OR VendorCountry="Canada"

gcusello
SplunkTrust
SplunkTrust

Hi aoliullah,
try with
sourcetype="vendor_sales" (VendorCountry="United States" OR VendorCountry="Canada")
Bye.
Giuseppe

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...