Splunk Search

How to merge two fields values into a single field?

Allampally
Path Finder

Hi,

I have the below stats result

**Service          Method               Action**
Service1                  Method1                 NULL
Service2                  Method2                 NULL
Service3                  NULL                Method3
Service4                  NULL                Method4

Now I want to merge Method and Action Fields into a single field by removing NULL values in both fields.

1 Solution

xpac
SplunkTrust
SplunkTrust

Hey,

This looks like the perfect use case for coalesce():

| eval Method=coalesce(Method, Action)

Read up on its details here:
http://docs.splunk.com/Documentation/Splunk/7.1.0/SearchReference/ConditionalFunctions

View solution in original post

xpac
SplunkTrust
SplunkTrust

Hey,

This looks like the perfect use case for coalesce():

| eval Method=coalesce(Method, Action)

Read up on its details here:
http://docs.splunk.com/Documentation/Splunk/7.1.0/SearchReference/ConditionalFunctions

Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...