Splunk Search

How do I hide rows if a field matches a certain value?

jiaqya
Builder

i have 2 columns , one which has install status and the other which has the exception status.
install status has yes/no AND exception status has "exception/no"

if i find "exception" in this field, then i would like to hide all rows which contains that field=exception.

is this possible?

the pattern match value is coming from a drill down input. So if a user clicks on "Exception", i still need to show that, so cannot use the !="exception".

Tags (1)
0 Karma
1 Solution

jiaqya
Builder

Got this fixed by adding below code.

|eval mytext = if((Name ="No" AND Exception="Exception" ), "ExcludeThisRecord","NoNeedToExclude")
|search NOT mytext="ExcludeThisRecord"

View solution in original post

0 Karma

jiaqya
Builder

Got this fixed by adding below code.

|eval mytext = if((Name ="No" AND Exception="Exception" ), "ExcludeThisRecord","NoNeedToExclude")
|search NOT mytext="ExcludeThisRecord"

0 Karma

kmorris_splunk
Splunk Employee
Splunk Employee

Assuming you are extracting that field already, you can just filter that out in your base search. For example:

index=YOUR_INDEX sourcetype=YOUR_SOURCETYPE YOUR_FIELD!="exception" |
table _time YOUR_FIELD ANOTHER_FIELD

Making assumptions on your search in general, but that would be the easiest way.

0 Karma

jiaqya
Builder

Morris, thanks for your response.

the pattern match value is coming from an drilldown input.
so if user clicks on "Exception" i still need to show that, so cannot use the !="exception".

i am not able to explain the scenario here , but ill try.
i have 2 columns , one which has install status and the other which has the exception status.
install status has yes/no AND exception status has "exception/no"

so if input value is yes, i get all the yes, irrespective of exception status, bcoz yes means installed, so thats ok
if input values is exception, then irrespective of install status, it will show exception, this is also ok
now problem i have is with "no", if install status is "no" and exception status is "exception", then i would like to exclude the exception systems out of "no" click report.

so i was looking at some solution , which after the report output can exclude exception="exception" rows in case "install status"="no"

hope the problem is explained..
sorry for long write up.

0 Karma

jiaqya
Builder

Think this can be done with search not, can any of you provide me a syntax where in i can do a search not when a column value=matches a pattern. thanks.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...

Network to App: Observability Unlocked [May & June Series]

In today’s digital landscape, your environment is no longer confined to the data center. It spans complex ...

SPL2 Deep Dives, AppDynamics Integrations, SAML Made Simple and Much More on Splunk ...

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...