Knowledge Management

Is there a way for one calculated field to pull data from another calculated field?

akawacz
Path Finder

Hello

Is there a way that one calculated field can pull data from another calculated field?

I have created 2 calculated fields Fields » Calculated fields. One based on the other.

e.g

FirstOne= "A"
SecondOne=FirstOne."A"

After doing this in Splunk Web, that is not possible. Maybe there is a way to set up this in conf files?

thank you

0 Karma
1 Solution

HeinzWaescher
Motivator

The documentation says that this is not possible:

When Splunk Enterprise evaluates calculated fields, it evaluates each expression as if it were independent of all of the others. This means you can't "chain" calculated field expressions, where the evaluation of one calculated field is used in the expression for another calculated field.

http://docs.splunk.com/Documentation/Splunk/6.3.1/Knowledge/definecalcfields

View solution in original post

HeinzWaescher
Motivator

The documentation says that this is not possible:

When Splunk Enterprise evaluates calculated fields, it evaluates each expression as if it were independent of all of the others. This means you can't "chain" calculated field expressions, where the evaluation of one calculated field is used in the expression for another calculated field.

http://docs.splunk.com/Documentation/Splunk/6.3.1/Knowledge/definecalcfields

Sebastian2
Path Finder

This should do:

 ...  | eval foo=4 | eval bar=foo+4

The "trick" is to complete calculation of the first fields before using it in another since there is no specific order in which fields are calculated.

0 Karma

akawacz
Path Finder

I was more referring to set up caclulated fields in Fields » Calculated fields not in the search.

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