Splunk Search

How to edit a time chart search to sort on count by date, rather than count by user?

bworrellZP
Communicator

Yesterday I was asked if I can swap out time chart, so that the time is on the top, and user name is on the left.

Background: I have a chart that shows users and count of logins by day. They want to be able to sort on the count by date rather than count by user.

Is there an easy way to change this?

Thanks

0 Karma
1 Solution

wpreston
Motivator

Try this:

...<your base search here>... | eval Date=strftime(_time, "%D") | chart count by User Date

View solution in original post

woodcock
Esteemed Legend

You can also use the transpose command.

0 Karma

wpreston
Motivator

Try this:

...<your base search here>... | eval Date=strftime(_time, "%D") | chart count by User Date
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...