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!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...