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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...