Splunk Search

how to add labels to chart values or order timechart

0range
Communicator

Hello.
My query looks like
...| timechart count by type
And I have values tupe_a, type_b and so on. When I call them like
eval name=case(type=type_a, "Error", type=type_b, "OK")...
and use "count by name" the rows in my staced timechart are ordered by name. But I need it to order by summary count. When I use "count by type" , they are ordered by summary count. How to specify the order or rename the types on the final chart?

Tags (3)
0 Karma

linu1988
Champion

Using timechart it's not possible as the values sorted will be distorting the time in the chart. Better use the stats function and do the calculation after the eval. Then apply the sort function. Thanks.

0 Karma

HiroshiSatoh
Champion

If you just add a total row

…|addcoltotals labelfield=name label=ALL

name count
Error 10
OK 100
ALL 110

0 Karma
Get Updates on the Splunk Community!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...