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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...