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!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

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

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...