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

---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...