Archive

How do I get an any selection to work on a multiselect where filter?

Explorer

Hi all,

I am currently working towards generating a user dashboard that requires nothing but text entry and multiselect input values. The user would like to filter by country, but wants an option for any, where it will return results from any country. The current setup is as follows:

searchfunction
$country$

where the $country$ is:
token prefix: | where (
token suffix: )
token value prefix:country="
token value suffix:"
delimiter: OR

for selection "United States" it formats:
searchfunction
|where (country="United States")

for selection of "United States" with "Unknown" it formats:
searchfunction
|where (country="United States" OR country="Unknown"

These return results exactly as expected and desired, but I can't see a way to have an "any" selection without just manually ticking every possible selection. Any ideas would be greatly appreciated.

Kind Regards,
Denym

Tags (1)
0 Karma
1 Solution

Super Champion

try adding one in the Static Options. Name is Any value is *

View solution in original post

0 Karma

Super Champion

try adding one in the Static Options. Name is Any value is *

View solution in original post

0 Karma

Explorer

unfortunately * isn't accepted as a valid wildcard with |where. with the static value put as * it still applies the token and token values, so the statement becomes |where (country="*"), which reads as invalid and breaks the outputs.

0 Karma

Super Champion

why are you using "where"? Can you switch it to "search" and get the results you need?

0 Karma

Explorer

Changing to a search filter and using the * for the static "all" entry worked perfectly for both single county, multi-country and "all" selection, thank you cmerriman.

0 Karma

Super Champion

just as a note, I generally use "where" to compare two fields and search to filter one field.

for instance:
|where count=totalCount to filter down rows where an event has a count equal to the entire count
|search count>200 to filter down rows where the count is greater than 200

0 Karma