Splunk Search

If I use more than 6 times append command in query the Chart command shows incorrect result

nivethainspire_
Explorer

I ran the below query,

index=s sourcetype=S_1
| search Gene="dow" OR Gene="x" OR Gene="ari" OR Gene="lia" OR Gene="SX" OR Gene=z
| append [search index=s sourcetype="S_2"|fillnull |eval Gene="rage"] 
| append [search index=s sourcetype=S_3 |fillnull|eval Gene="ork"]
| append [search index=s sourcetype=S_4|fillnull|eval Gene="tat"]
| append [search index=s sourcetype=S_5 | fillnull |eval Gene="bas"]
| append [search index=s sourcetype=S_6 | fillnull |eval Gene="bas1"]
| append [search index=s sourcetype=S_7|fillnull value=""|eval Gene="App"|fields *]
|rename Gene as General 
| stats count by General,"Report"
|eventstats sum(*) as sum_* by General 
|foreach * [eval "Status %"=round((count/sum_count)*100,2)]|rename count as Count
|fields - sum_count
|chart values("Status %") over "Report" by General
|sort "Report" desc

I expect the below Result,

nivethainspire__0-1603891465655.png

But I get the below result, where "bas1" and "App" shows together as "OTHER"

nivethainspire__1-1603892149780.png

And it happens after I use the chart command.

Anyone can help me out.

Labels (1)
Tags (2)
0 Karma
1 Solution

isoutamo
SplunkTrust
SplunkTrust
useother=f just drop that OTHER column away. If you want to see it, then you should add limit=0 (to see all) or limit=20 (to see 20 values).

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

It's not the number of appends, it's the number of fields.  By default, the chart command displays 10 fields and puts the rest into "other".  To change that, use "| chart useother=f ...".

---
If this reply helps you, Karma would be appreciated.
0 Karma

nivethainspire_
Explorer

@richgalloway  Still I face the same issue.

0 Karma

isoutamo
SplunkTrust
SplunkTrust
useother=f just drop that OTHER column away. If you want to see it, then you should add limit=0 (to see all) or limit=20 (to see 20 values).

isoutamo
SplunkTrust
SplunkTrust
Hi
this is due to chart's limit which is 10 by default. You could change it by adding chart limit=XX (or limit=0 to unlimited it).
Anyhow you probably should tune your search to use eg. stat and not append? There are good presentation in conf how to do it.
https://conf.splunk.com/files/2020/slides/TRU1761C.pdf
r. Ismo
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!

.conf25 Global Broadcast: Don’t Miss a Moment

Hello Splunkers, .conf25 is only a click away.  Not able to make it to .conf25 in person? No worries, you can ...

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...