Splunk Search

format splunk table

edookati
Path Finder

I have 3 fields date, hour & count(X). can someone please tell me how to forma table like below...count of X

      date1       date2 

Hour1 count(X) count(X)
Hour2 count(X) count(X)

Thanks.

Tags (1)
0 Karma
1 Solution

somesoni2
Revered Legend

I am assuming you have some aggregation command like "stats" to get those three columns. If that is the case I would recommend to rename the "count(X)" as countX or something similar.

Try this

Your base search giving date, hour , countX fields | chart sum(countX) as countX over hour by date

OR

Your base search giving date, hour, X fields | chart count(X) as countX over hour by date

OR

your base search giving date, hour, count(X) fields | chart sum("count(X)") as countX over hour by date

View solution in original post

somesoni2
Revered Legend

I am assuming you have some aggregation command like "stats" to get those three columns. If that is the case I would recommend to rename the "count(X)" as countX or something similar.

Try this

Your base search giving date, hour , countX fields | chart sum(countX) as countX over hour by date

OR

Your base search giving date, hour, X fields | chart count(X) as countX over hour by date

OR

your base search giving date, hour, count(X) fields | chart sum("count(X)") as countX over hour by date

edookati
Path Finder

fantastic. It worked.
Thanks.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...