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!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...