Splunk Search

Chart not displaying unique counts

sheloaha
Path Finder

I'm trying to chart the count of how many different methods are detected during a specific search. The methods are in different fields so I am using makemv and delim to create one field called "method". When I do chart or stats count by method I get a pie chart that contains equal sections. I need to have the actual count of each method instead. What am I missing?

basic search | transaction UID | rename fieldA as Create, fieldB as Close, fieldC as Update, fieldD as PostClose, fieldE as Reopen |eval method="Create,Close,Update,PostClose,Reopen" | makemv method delim=","| mvexpand method | chart count by method

Tags (4)
0 Karma
1 Solution

woodcock
Esteemed Legend

Your mistake is using transaction and also mvexpand try this instead:

basic search
| stats values(*) AS * BY UID 
| rename fieldA as Create, fieldB as Close, fieldC as Update, fieldD as PostClose, fieldE as Reopen 
| eval method=mvappend(Create,Close,Update,PostClose,Reopen)
| chart count BY method

View solution in original post

0 Karma

woodcock
Esteemed Legend

Your mistake is using transaction and also mvexpand try this instead:

basic search
| stats values(*) AS * BY UID 
| rename fieldA as Create, fieldB as Close, fieldC as Update, fieldD as PostClose, fieldE as Reopen 
| eval method=mvappend(Create,Close,Update,PostClose,Reopen)
| chart count BY method
0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...