Splunk Search
Highlighted

How to count numbers of records per category from a table?

Communicator

Hi. I have a search result returned as the following:

name   type   col_1   col_2   col3
====   ====   =====   =====   =====
N1     T1      A        A       C
N1     T2      A        B       D
N2     T1      D        D       C

How to count numbers of "A", "B", "C", and "D"? For example, the result looks like this:

new_field    count
=========    =====
A             2
B             1
C             2
D             3

Any helps are great appreciated.

Thanks.

0 Karma
Highlighted

Re: How to count numbers of records per category from a table?

Legend

Try this

base search | fields - type | untable name fields values | stats count by values

View solution in original post

0 Karma
Highlighted

Re: How to count numbers of records per category from a table?

Communicator

wow, thank you very much for your help!!!

0 Karma