Splunk Search

chart with where

Jasmine
Path Finder

Please help me on the below items:

#1)

| chart count(WriteType) over Collection by WriteType  | sort Collection

for above query  can we add conditon as below:  (i am facing issue here)

| chart count(WriteType) over Collection by WriteType |where c in("test","qa")  | sort Collection

 #2):

can we add one more field after WriteType as below:

| chart count(WriteType) over Collection by WriteType, c |where c in("test","qa")
Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

1) c doesn't exist unless it is a value in WriteType and even then it will contain a count not "test" or "qa"

2) No, you can only have two fields with chart.

Perhaps it would be better if you explained what you are trying to do, and share some representative anonymised sample events? (I may have said that before a few times!)

0 Karma
Get Updates on the Splunk Community!

Accelerate Service Onboarding, Decomposition, Troubleshooting - and more with ITSI’s ...

Accelerate Service Onboarding, Decomposition, Troubleshooting - and more!  Faster Time to Value Managing and ...

New Release | Splunk Enterprise 9.3

Admins and Analyst can benefit from:  Seamlessly route data to your local file system to save on storage ...

2024 Splunk Career Impact Survey | Earn a $20 gift card for participating!

Hear ye, hear ye! The time has come again for Splunk's annual Career Impact Survey!  We need your help by ...