Getting Data In

How to sort the contents of a list by timestamp

whydoineedtoreg
New Member

I'm currently querying

source="log" | stats list by Id

Which gives me nicely grouped data.

However I would like the content of those groups sorted by Timestamp.
That is to say I do not want the groups themselves sorted but the records inside each group.

0 Karma
1 Solution

somesoni2
Revered Legend

Right now they will sorted in reverse-chronological/descending order of timestamp (_time field). Do you want to sort in ascending/chronological order? If yes, try like this

source="log" | reverse | stats list by Id

View solution in original post

somesoni2
Revered Legend

Right now they will sorted in reverse-chronological/descending order of timestamp (_time field). Do you want to sort in ascending/chronological order? If yes, try like this

source="log" | reverse | stats list by Id
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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