Splunk Search

How to remove additional results from search.

ericdelacruz
Engager

I have a search that is showing the data I want, but I want to isolate it to a specific team and not show all results with other teams. In the below search I tried to isolate only the Sales team, but am seeing results for other teams as well. I tried specifying at the top only Sales, but that didn't work. Any ideas?

cdr_events ( callingPartyGroup="Sales" OR finalCalledPartyGroup="Sales" )
| eval name=coalesce(callingPartyName, finalCalledPartyName)
| eval group=coalesce(callingPartyGroup,finalCalledPartyGroup)
| eval subgroup=coalesce(callingPartySubgroup, finalCalledPartySubgroup)
| fillnull group subgroup value="NULL"
| append [ | inputlookup groups append=t
| eval duration_in_minutes="0"]
| eval nameGroupSubgroup=name + "---" + group + "---" + subgroup
| chart sum(duration_in_minutes) as minutes over nameGroupSubgroup by day_of_week
| eval nameGroupSubgroup=split(nameGroupSubgroup,"---")
| eval name=mvindex(nameGroupSubgroup,0)
| eval group=mvindex(nameGroupSubgroup,1)
| eval subgroup=mvindex(nameGroupSubgroup,2)
| fields name group subgroup Mon Tue Wed Thu Fri Sat Sun
| addtotals fieldname="Total Minutes"

Tags (1)
0 Karma

somesoni2
Revered Legend

I'm guessing that your lookup table file for "groups" has all the teams and that is causing other teams to show up. Add your Sales team filter to your | append [|inputlookup groups .. query as well

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

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