Splunk Search

Splunk stats count by two fields

srujan594
Loves-to-Learn

Hi 

Can anyone please help with this extracting stats count by two fields. 

I've below data in each transaction

type                status

A                    200

B                    400

C                    200

B                    200

A                    200

B                    400

A                    500

C                    300

 

I need stats in below format

type              status           count

A                    200                 2

A                   500                  1

B                    200                 1

B                   400                 2                                  

C                 200                   1 

C                 300                   1 

 

Labels (2)
0 Karma

danielcj
Communicator

Hi,

 

Please try the following:

<YOUR_QUERY>
| stats count by type, status
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 ...