Splunk Search

Getting 2 aggregate result for 2 searches

jimjohn
Path Finder

My search string is
host=ABC| append [search host=DEF]|stats sum(V) by "ER Code"
Can I have a count function also with search.Count should by calculated based on another field.

Ex:host=ABC| append [search host=DEF]|stats sum(V) by "ER Code"|stats count(I) by "User"
Is it possible to achieve this result.

0 Karma

kristian_kolb
Ultra Champion

Your sample search does not really make sense.

host=ABC | append [search host=DEF]

is the same as

host=ABC or host=DEF

Sample events and a sketch of the desired output would be better if you want more qualified help.

/k

Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...