Getting Data In

Error while searching using the value from the input

quintessence
New Member

I have the following dynamic options for my "consumer" multiselect:

index=$index$ |  fillnull value="not specified" "header" | dedup "header" | table "header" | rename "header" as "consumer"

And something like this for my chart where I'm trying to filter the data by the value from multiselect:

index=$index$ |  fillnull value="not specified" "header" | stats  count by  "header" | search "header"=$consumer$

The problem is when I'm trying to show data only for "not specified" consumers - it can't find anything.
The query is working if I change $consumer$ to "not specified", so the problem is in $consumer$.
Any advices?

0 Karma

somesoni2
Revered Legend

Try to add the filter before the stats and add quotes around the token (as it has spaces in the value)

index=$index$ |  fillnull value="not specified" "header"  | search "header"="$consumer$" | stats  count by  "header"

If it doesn't work, please share your multiselect xml.

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...