Splunk Search
Highlighted

How to sort columns values(Desc) for a column chart in decreasing order?

New Member

Hello,

I wanna know if it's possible to sort columns in decreasing order in a column chart.

Thanks in advance for your help

0 Karma
Highlighted

Re: How to sort columns values(Desc) for a column chart in decreasing order?

Hi, simply put a sort command behind your search something like this:

... | sort column_name

you can control desc order with a minus:

... | sort -column_name
Highlighted

Re: How to sort columns values(Desc) for a column chart in decreasing order?

SplunkTrust
SplunkTrust
0 Karma
Highlighted

Re: How to sort columns values(Desc) for a column chart in decreasing order?

New Member

Actually, I want to sort the columns of column chart by value, I don't know if it's possible or not

0 Karma
Highlighted

Re: How to sort columns values(Desc) for a column chart in decreasing order?

Engager

Thank you. Exactly what I needed.
One column ranked by priority (Asc), the other by the length of the event (desc)

0 Karma
Highlighted

Re: How to sort columns values(Desc) for a column chart in decreasing order?

Highlighted

Re: How to sort columns values(Desc) for a column chart in decreasing order?

New Member

Gooood (Y)
Thanks 🙂

0 Karma
Highlighted

Re: How to sort columns values(Desc) for a column chart in decreasing order?

New Member

It doesn't work for me this is my query

   <query>index=aut_kpi2 $servicesToken$ $catalogToken$ $subscriptionToken$ | timechart span=$spanToken$ count by service_offering_name</query>
   <earliest>$timeToken.earliest$</earliest>
   <latest>$timeToken.latest$</latest
0 Karma
Highlighted

Re: How to sort columns values(Desc) for a column chart in decreasing order?

You used timechart, which is used to calculate values over time buckets. You cant reorder the time, it makes no sense. Take stats instead of timechart.

0 Karma
Highlighted

Re: How to sort columns values(Desc) for a column chart in decreasing order?

New Member

but i want something depends on date

0 Karma
Speak Up for Splunk Careers!

We want to better understand the impact Splunk experience and expertise has has on individuals' careers, and help highlight the growing demand for Splunk skills.