Splunk Search

How to edit my search to create a chart that inserts "NO" wherever the value is blank?

gudavasr
Path Finder

Hi,

I have a chart like this from a search:

source="*.log" "Found TaskId" | | dedup source  |  eval FileFoundDate =  valdate + "_" + valtime  | eval Foundforvaldate = "YES" |  chart values(Foundforvaldate) over  TaskId  by   valdate  usenull=f useother=f

This is my current output:

TaskID   20150601   20150602   20150603
123        YES                    YES
213                    YES        YES
214                               YES

How can I insert "NO" wherever the value is blank?

Thank You

Tags (3)
0 Karma
1 Solution

woodcock
Esteemed Legend

Like this:

source="*.log" "Found TaskId" | | dedup source | eval FileFoundDate = valdate + "_" + valtime | eval Foundforvaldate = "YES" | chart values(Foundforvaldate) over TaskId by valdate usenull=f useother=f | fillnull value="NO"

View solution in original post

woodcock
Esteemed Legend

Like this:

source="*.log" "Found TaskId" | | dedup source | eval FileFoundDate = valdate + "_" + valtime | eval Foundforvaldate = "YES" | chart values(Foundforvaldate) over TaskId by valdate usenull=f useother=f | fillnull value="NO"

gudavasr
Path Finder

Thank You.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...