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
SplunkTrust
SplunkTrust

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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...