Splunk Search

playing with data II

reverse
Contributor

q1- how can i get c4 where c4 will always be difference of values in c3 against first of c2 - next of c2
for example .. here c4 for A = 76-7 .. 7-6 ... 6-677.. and so on

Please guide.

c1  c2  c3
A   1   76
A   2   7
A   3   6
A   4   677
B   1   65
B   2   675
B   3   90
B   4   78
C   1   121
C   2   56
C   3   54
C   4   67
D   1   56
D   2   6
D   3   5
D   4   657
Tags (1)
0 Karma

reverse
Contributor

@Vijeta please guide.

0 Karma

Vijeta
Influencer

@reverse Try this

<your query> | sort c1,c2|streamstats list(c3) as list , count as count by c1| eval diff  = mvindex(list, count-2)| eval c4= c3 - diff
Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...