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

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

@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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...