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!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...