Splunk Search

How to convert tabular data to a specific format?

mnj1809
Path Finder

Hello,

I've the following tabular formatted data:

mnj1809_0-1669922038675.png

How can I achieve the following:

mnj1809_1-1669922122511.png

Thanks in advance for your help.

@ITWhisperer

Labels (1)
0 Karma
1 Solution

bowesmana
SplunkTrust
SplunkTrust

Like this

Your search...
| stats list(country) as country list(count) as count by category region
| eventstats sum(count) as byRegion by category region
| eventstats sum(byRegion) as byCategory by category
| table category region country count byRegion byCategory

View solution in original post

bowesmana
SplunkTrust
SplunkTrust

Like this

Your search...
| stats list(country) as country list(count) as count by category region
| eventstats sum(count) as byRegion by category region
| eventstats sum(byRegion) as byCategory by category
| table category region country count byRegion byCategory

mnj1809
Path Finder

Thanks for your prompt reply.
Sorry for the late reply as I was out of town. The solution is working fine for me.
@bowesmana 

0 Karma
Get Updates on the Splunk Community!

Splunk Observability Cloud’s AI Assistant in Action Series: Analyzing and ...

This is the second post in our Splunk Observability Cloud’s AI Assistant in Action series, in which we look at ...

Elevate Your Organization with Splunk’s Next Platform Evolution

 Thursday, July 10, 2025  |  11AM PDT / 2PM EDT Whether you're managing complex deployments or looking to ...

Splunk Answers Content Calendar, June Edition

Get ready for this week’s post dedicated to Splunk Dashboards! We're celebrating the power of community by ...