Splunk Search

Show only non-zero fields

ericchaucl
Path Finder

Hi,

How can I run a search and only display those columns with non-zero values? For example, I have fields test1, test2, test3, .... test99, in which only test2 and test10 are non-zero. Would be perfect if there is something like this:
| fields test* | where test* > 0

P.S. To be more specific, this scenario happens when I create and apply a TFIDF model. The system automatically generate a huge # of fields with suffix _tfidf. I would like to run some query and is interested in those non-zero fields only.

Tags (1)
0 Karma
1 Solution

3no
Communicator

Hey,

| table test* | transpose | rename column as Test "row 1" as count | where count > 0

3no.

View solution in original post

0 Karma

3no
Communicator

Hey,

| table test* | transpose | rename column as Test "row 1" as count | where count > 0

3no.

0 Karma

ericchaucl
Path Finder

It works! Million thanks!

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...