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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Level Up Your .conf25: Splunk Arcade Comes to Boston

With .conf25 right around the corner in Boston, there’s a lot to look forward to — inspiring keynotes, ...

Manual Instrumentation with Splunk Observability Cloud: How to Instrument Frontend ...

Although it might seem daunting, as we’ve seen in this series, manual instrumentation can be straightforward ...

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

Ready to make your IT operations smarter and more efficient? Discover how to automate Splunk alerts with Red ...