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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...