Splunk Search

How to change column order created by chart

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

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

Champion
<your query>| fields P1,P2,P3,P4...
0 Karma
State of Splunk Careers

Access the Splunk Careers Report to see real data that shows how Splunk mastery increases your value and job satisfaction.

Find out what your skills are worth!