Splunk Search

Can we change how limit function behaves in chart command?

nyplawrencet
Engager

When using limit function in chart command, Splunk automatically adds columns and filters based on largest number.

Are we able to change to filter based on the SMALLEST number instead?

Ex:

index="_internal" | chart count over component by group limit=5

Thanks.

0 Karma
1 Solution

lguinn2
Legend

You can't change how limit works, but you can do this:

index="_internal" 
| stats count by component group 
| sort 5 count
| xyseries component group count

View solution in original post

lguinn2
Legend

You can't change how limit works, but you can do this:

index="_internal" 
| stats count by component group 
| sort 5 count
| xyseries component group count
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...