Splunk Search

Display Field Even No Values

qygoh
Engager

Hi i encounter an issues when i try to display field in table form without any values my data look like table below:

ID Values
MAIN1 1.5
MAIN2

MAIN3

MAIN4 4.3

This is my search string:

Label="MIDPM"  Order=2 |stats latest(Value) as Value by ID| eval Value=round(Value,2)| eval Value=if(isnull(VALUE),0,Value)| rename ID as Label

The result i get was display Main1 and Main4 only. I fail to replace those fields as zero. Mind to how should i resolve this issues?

0 Karma

woodcock
Esteemed Legend

Try adding this:

 ... | eval Value=if(isnum(Value),Value,0)
0 Karma

qygoh
Engager

I just tried it out it only show me the result with MAIN1 AND MAIN4

0 Karma

woodcock
Esteemed Legend

You need to decide what the name of your "value" field is: is it VALUE, Value, or Values (you use each of this in different spots). Once you use the SAME NAME CONSISTENTLY, then this answer will work.

0 Karma

qygoh
Engager

is Value i tried this as well
if(isnull($result.MAIN2$),0.00,$result.MAIN2$)
it didn't working

0 Karma

qygoh
Engager

i not sure isn't possible due Splunk 6.4 didn't compatible with "fillnull" feature

0 Karma

woodcock
Esteemed Legend

Add this:

... | fillnull value="0" Value
0 Karma

qygoh
Engager

it didn't work the value is no null or empty that why "fillnull" no working

0 Karma

woodcock
Esteemed Legend

You need to decide what the name of your "value" field is: is it VALUE, Value, or Values (you use each of this in different spots). Once you use the SAME NAME CONSISTENTLY, then this answer will work.

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi qygoh,
have VALUE in uppercase is an error in your answer or is really uppercase?
because you should use

| eval Value=if(isnull(Value),0,Value)

Bye.
Giuseppe

0 Karma

qygoh
Engager

hi my value is in lower case. sorry for the typo. But it still no working due to no result found. It didn't show as null or empty.

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!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...