Splunk Search

How can I reverse the x and y axes?

kennethyeung
New Member

current I have this search:

......||addcoltotals | table *_August_R | reverse | head 1 

1_Ausgust_R,2_Ausgust_R,3_Ausgust_R,4_Ausgust_R,
26                    30                   15                       27

I want to change it to

Date, Number
1_August, 26
2_August, 30
3_August, 15
3_August, 27
0 Karma
1 Solution

HiroshiSatoh
Champion

Try this!

    ......|addcoltotals | table *_August_R | reverse | head 1
|transpose|rename column as Date,"row 1" as Number|eval Date=substr(Date,1,len(Date)-2)

View solution in original post

0 Karma

HiroshiSatoh
Champion

Try this!

    ......|addcoltotals | table *_August_R | reverse | head 1
|transpose|rename column as Date,"row 1" as Number|eval Date=substr(Date,1,len(Date)-2)
0 Karma

kennethyeung
New Member

1 more question now, if
......||addcoltotals | table *_August_R , *_August_A| reverse | head 1
1_Ausgust_R,2_Ausgust_R,3_Ausgust_R,4_Ausgust_R, 1_August_R , 2_August_R
26 30 15 27 5 20

want to do below
Date , Number, Another Number
1_August, 26, 5
2_August, 30, 20
.....

how do i use eval but base on other col

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