Knowledge Management

Why does alias not always work as expected?

marcus_doron
New Member

In my Results, for each event, I can only get field A OR field B.
I created two aliases: A=C, B=C
So each event should have C with a value.

But in the result, I can see that sometimes C gets value A, sometimes value B, and sometimes Blank.

Tags (2)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi marcus_doron,
If you have only one of the three field with value or if you have an order of importance in your fields, you could use the coalesce function:

| eval C=coalesce(C,A,B)

in this way your C field take value, in order, from C, A, B.

Bye.
Giuseppe

0 Karma
Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...