Splunk Search

How to write a search to exclude an existing field(s) if Field1 has a value in ColumnA?

parikhapurva04
New Member

Table below showing Column A, Column B, Column C and Column D.

Calculation has to be:
If Field1 has ColumnA value, then ignore (Don't Count) Field2 & Field3.
If Field2 has ColumnA value then ignore (Don't Count) Field3 value.
Also total calculated rows should not be more than 3 as there are only 3 Applications.

Column A        Column B         Column C           
xyz             Field1           Application1
xyz             Field2           Application1
xyz             Field2           Application2
abc             Field3           Application2
efg             Field3           Application3

I want number of times Field 1, Field2 and Field3 is appearing. So the expected result should be

Column A        Column B
Field1          1
Field2          1
Field3          1
Tags (2)
0 Karma

somesoni2
Revered Legend

I find the calculation logic to be very confusing. Could you provide more details on the same, possibly with some example values?

0 Karma

parikhapurva04
New Member

I am trying to get value of different column on the same row.

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