Splunk Dev

How can I change the position of the addtotals field

kaphie2002
New Member

I created a dashboard with the following query that displays everything I need however the addtotals field "Total" is the last column in the table. How can I move it to the 2nd column? Thanks

Search | rex field=_raw ".renderTime.*connect.*send.*ms.(?.\w+)." | fields + host + AccountID | stats count by host, AccountID | xyseries AccountID host count | addtotals host*

Current Output:

AcccountID Host1 Host2 Host3 Total

Desired Output:

AccountID Total Host1 Host2 Host3

Tags (1)
0 Karma

somesoni2
Revered Legend

Try like this

Search | rex field=_raw ".*renderTime.*connect.send.ms.(?.\w+)." | fields + host + AccountID | stats count by host, AccountID | xyseries AccountID host count | addtotals | table AccountID Total *
0 Karma

elliotproebstel
Champion

You can rearrange field display order by using the fields command:

your search | fields AccountID Total Host1 Host2 Host3
0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...