Splunk Search

Changing the sorting order of a chart

szabados
Communicator

I got a stacked bar chart from the following search:
... | chart count by "field1" "field2"
On the X-axis I have field2 which is a bunch of numeric values, currently like 0..1..10
That what I want to change to go descending 10..0.
Tried the sort command, or doing like chart count by -field2, but that didn't work.
How can I achieve that?

Tags (1)
0 Karma
1 Solution

stephanefotso
Motivator

Here you go :

 ...| chart count by "field1" "field2"|reverse
SGF

View solution in original post

0 Karma

stephanefotso
Motivator

Here you go :

 ...| chart count by "field1" "field2"|reverse
SGF
0 Karma
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...