Dashboards & Visualizations

Only Show certain values

msarkaus
Path Finder

Any suggestions would be appreciated.

In the first row I would like to show only the first 34 characters and in the second row the first list 39 characters.

msarkaus_0-1720724943510.png

I figured out how to only show a certain number of characters for all rows, but not individual rows.

| eval msgTxt=substr(msgTxt, 1, 49)
| stats count by msgTxt
Tags (1)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @msarkaus ,

if the condition is fixed (SUCCEDED 34 chars and FAILED 39 chars), you could use an if condition in the eval command:

<your_search>
| eval msgTxt=if(match(msgTxt,"SUCCEDED"), substr(msgTxt, 1, 34), substr(msgTxt, 1, 39)
| stats count by msgTxt

Ciao.

Giuseppe

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You need to be able to identify which is the first event and which is the second. You can do this like so:

| streamstats count as row
0 Karma

PickleRick
SplunkTrust
SplunkTrust

You want to show 34 characters because the event is first or because of some other reason and the event just happens to be first?

0 Karma
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  &#x1f680; 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 ...