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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...