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!

Index This | Divide 100 by half. What do you get?

November 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...

Stay Connected: Your Guide to December Tech Talks, Office Hours, and Webinars!

❄️ Celebrate the season with our December lineup of Community Office Hours, Tech Talks, and Webinars! ...

Splunk and Fraud

Watch Now!Watch an insightful webinar where we delve into the innovative approaches to solving fraud using the ...