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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...