Splunk Search

How to filter out results where a field value is less than 1?

ateterine
Path Finder

Hi Splunk community,

I have this query

source=main | 
transaction user_id | 
chart count as Attempts, count(eval(isp_event_type!="authentication_succeeded")) as Failed, count(eval(isp_event_type="authentication_succeeded")) as Success by isp_provider | 
eval percentage = round(Success / Attempts * 100, 1) | 
eval "Login Percentage" = tostring(percentage) + "%" | 
rename isp_provider as "ISP Provider" | 
sort "Login Percentage" |
fields "ISP Provider" Attempts "Login Percentage" flag

I need to filter out those results where Attempts<1 from the results table. What is the best way of doing that?
Thanks!

Tags (3)
1 Solution

gauldridge
Path Finder

Have you tried adding | where Attempts>1 at the end of your search?

You could even place the where statement right after your chart section before doing any evals.

View solution in original post

gauldridge
Path Finder

Have you tried adding | where Attempts>1 at the end of your search?

You could even place the where statement right after your chart section before doing any evals.

ateterine
Path Finder

Thank you! I was missing a pipe when trying this before. Now it works!

0 Karma
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 ...