Reporting

How do I replace null value in Pivot?

juzzbitzz
New Member

I have a pivot table that has a null value for a few of the records in the "Date" column that is preventing me from sorting the table. How and with what do I replace the null value in the Date column?

Tags (2)
0 Karma

woodcock
Esteemed Legend

You have 3 options:

...  | eval Date = coalesce(Date, yourAlternateFieldHere, "Your Hard-Coded Default Value Here")

OR

...  | fillnull value="Your Hard-Coded Default Value Here" Date

OR

...  | filldown Date

I leave it as an exercise for the reader to figure our (or @DalJeanis to explain) the differences.

0 Karma

DalJeanis
Legend

You need to populate the Date field.

Identify, on the records with no Date, what is a good candidate for substitution, then do something like

| eval Date = coalesce(Date,mySubstituteField)  
0 Karma

renjith_nair
Legend

@juzzbitzz,

Try adding |fillnull value="your value for date" Date in the base search before aggregation/sort

Happy Splunking!
0 Karma
Get Updates on the Splunk Community!

.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 ...

Introducing the 2024 SplunkTrust!

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