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!

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...

Data Management Digest – November 2025

  Welcome to the inaugural edition of Data Management Digest! As your trusted partner in data innovation, the ...