Splunk Search

How to change column order created by chart

halloweening
New Member

I create a search:

...my search...
| chart values(duration) over TimeGap by Process

The table shows duration used by each process at specific time gap (t1,t2,t3..). It looks like:

TimeGap P3 P4 P1 P5 P2
t1
t2
t3
...

The column names (Pn) which are string-formatted field created by rex command mean different processes; they are sorted alphabetically with the chart command. How can I sort the Process by a specific sequence as P1 P2 P3 P4 P5?

Tags (3)
0 Karma

woodcock
Esteemed Legend

If you are searching for alphabetical, just add this to the bottom:

... | table _* *

If you need a particular order, then spell it out like thi| makeresults

... | table _time P1 P2 P3 Etc and Whatever
0 Karma

Sukisen1981
Champion
<your query>| fields P1,P2,P3,P4...
0 Karma
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 ...