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!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...