Splunk Search

Sum of a multivalue field inside a row

varunCarbyne
Explorer

Sum of a multivalue field inside a row

Hi below is how my processed data look like
alt text

And the expected output is to have aggregated values of Field A, field B, field C and Total,
the expected output looks like below :
alt text

0 Karma
1 Solution

kamlesh_vaghela
SplunkTrust
SplunkTrust

@varunCarbyne

Try

YOUR_SEARCH | stats sum("field A") as "field A", sum("field B") as "field B",sum("field C") as "field C",sum(Total) as Total, Values(IP) as IP by User | table User IP "field A" "field B" "field C" Total

View solution in original post

kamlesh_vaghela
SplunkTrust
SplunkTrust

@varunCarbyne

Try

YOUR_SEARCH | stats sum("field A") as "field A", sum("field B") as "field B",sum("field C") as "field C",sum(Total) as Total, Values(IP) as IP by User | table User IP "field A" "field B" "field C" Total

DalJeanis
Legend

Come on, @kamlesh_vaghela , if you're going to answer correctly, make it an answer!

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

Thanks, @DalJeanis 🙂

Converted to Answer.

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi varunCarbyne,
could you share your search?
Bye.
Giuseppe

0 Karma

varunCarbyne
Explorer

I have tried eventstats(FieldA) by User, But its now working

0 Karma

varunCarbyne
Explorer

@vnravikumar @harishalipaka

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

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 GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...