Splunk Enterprise

Chart count result process - replace zero with SPACE for particular cell

rally0321
Path Finder

I get below result when use Chart count over field-A by Field-B

We can see there are cell with value 0, is there any solution to replace these 0 with SPACE for particular cell? Thanks.   replace 0 for over value 1 + by field value 1/4;  replace 0 for over value 2 + by field value 3/5.

Over field value

by field value1

by field value2

by field value3

by field value 4

by field value5

Total

Over value 1

0

0

1

0

0

1

Over value 2

0

0

0

603

0

603

Over value 3

0

0

12

0

0

12

Over value 4

0

0

0

600

0

600

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

ITWhisperer
SplunkTrust
SplunkTrust
| eval "by field value2" = if('Over field value'="Over value 2" AND 'by field value2'=0, " ", 'by field value2')

View solution in original post

rally0321
Path Finder

above command will replace 0 to space for all cells. Can we somehow replace the cell for selected row/column only? 

for example replace 0 in row 2, column 2/5 to SPACE and leave 0 in row 2,  column 3/6. 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| eval "by field value2" = if('Over field value'="Over value 2" AND 'by field value2'=0, " ", 'by field value2')

ITWhisperer
SplunkTrust
SplunkTrust

Try something like this:

| foreach *
  [| eval "<<FIELD>>"=if('<<FIELD>>'=0," ",'<<FIELD>>')]
Get Updates on the Splunk Community!

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...

Cloud Monitoring Console - Unlocking Greater Visibility in SVC Usage Reporting

For Splunk Cloud customers, understanding and optimizing Splunk Virtual Compute (SVC) usage and resource ...

Automatic Discovery Part 3: Practical Use Cases

If you’ve enabled Automatic Discovery in your install of the Splunk Distribution of the OpenTelemetry ...