Splunk Search

Top 10 Customers - exclude OTHER

ehaque
New Member

I use below spl to get top 10 cust by sales, but looks like it is creating a OTHER category whcih i dont want to visualize in graph. How can i exclude it? OTHER is not in the data.

source="swerve_sales.csv" host="swerve" sourcetype="csv-sales" | timechart sum(TOTAL) as sales by FIRSTNAME | sort - sales | head 10

Tags (3)
0 Karma

ehaque
New Member

thanks guys!
fyi, looks like with 'limit' i dont need to sort anymore.

source="swerve_sales.csv" host="swerve" sourcetype="csv-sales" | timechart span=1w limit=10 useother=f sum(TOTAL) as sales by FIRSTNAME

0 Karma

somesoni2
Revered Legend

Try something like this

source="swerve_sales.csv" host="swerve" sourcetype="csv-sales" | timechart sum(TOTAL) as sales by FIRSTNAME useother=f | sort - sales | head 10
0 Karma

pradeepkumarg
Influencer

try below

source="swerve_sales.csv" host="swerve" sourcetype="csv-sales" | timechart limit=10 sum(TOTAL) as sales by FIRSTNAME
0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...