Getting Data In

CSV import has many blank cells when creating a dashboard and using multiselect input there is a count mismatch.

Mary666
Communicator

Here is my multiselect code for the input:

<input type="multiselect" token="tok_ABCName" searchWhenChanged="true">
<label>ABC Name</label>
<default>All</default>
<prefix>(</prefix>
<valuePrefix>ABCName="</valuePrefix>
<valueSuffix>"</valueSuffix>
<delimiter>OR</delimiter>
<suffix>)</suffix>
<choice value="*">All</choice>
<fieldForLabel>ABC Name</fieldForLabel>
<fieldForValue>ABCName</fieldForValue>

 

Here is my main query:

 

| inputlookup Names_Software_R.csv | rename  "ABC Name" as ABCName  | search $tok_ABCName$  |  values(ABCName) as "ABC Name"  by ServerName

 

 

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Have you tried fillnull for your ABCName field.? Also note that, stats values will not include nulls or duplicates.

View solution in original post

0 Karma

Mary666
Communicator

@ITWhisperer  Thanks, the fillnull seems to have solved the issue for now. I will revisit my original CSV files to ensure I have all 400 and something servers coming up in my query. I basically just did | fillnull value=NULL before the search command. 

0 Karma

Mary666
Communicator

Hi @ITWhisperer 

yes, there is a stats command in front of my query.  My question is that I have a csv that was imported into Splunk. I can query everything just fine, but my csv has 400 servers and I am only getting a count of 91. This is due to the missing rows of data from my original CSV.  Is there a way I can work around the missing cells so that I can get the original count of 400 servers from my CSV? 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Have you tried fillnull for your ABCName field.? Also note that, stats values will not include nulls or duplicates.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Your main query doesn't look complete (presumably there is at least a stats command in front of the values(ABCName)?), but more to the point, what is your question?

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Vibe-coding, AI, and Splunkcraft: Highlights from the .conf26 Builder Bar

If you stopped by the Builder Bar at .conf26, thank you! This year, we brought ...

Thanks for the Memories: .conf26 Took Learning to New Heights

Thank you, Splunk Community, for making .conf26 in Denver one for the books. From packed Splunk University ...

Best Practices: Splunk auto adjust pipeline queue

When you enable autoAdjustQueue in Splunk, maxSize should be understood as the queue size Splunk starts with ...