Splunk Search

How would I remove duplicates but add up their counts?

Ragate
Explorer

I have two sources of data. One that has an Account Name, License Key, and Account Revenue. The other has License Key and an Item_Count field.
Current it shows like this
LicenseKey Item_Count
200IGN3 4
200IGN3 10
342mD3D 8
342mD3D 6

I would like to remove the duplicate keys and add up there item counts.

How would this be done?
Thanks in advance.

0 Karma

somesoni2
Revered Legend

Try like this

your current search showing fields LicenseKey Item_Count
| stats sum(Item_Count) as Item_Count by LicenseKey
0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...