Splunk Search

search query with table.

kiran331
Builder

Hi all, I have the fields unit, user, work from the result set:

unit      user     work 
   a     kiran        w
   b    splunk        x
   c       abc        y
   d      cdvv        z

I need these results into

      a          b           c         d
kiran-w    cdvv -z    splunk-x     abc-y

How to get this final table?

Tags (1)
0 Karma
1 Solution

woodcock
Esteemed Legend

Just add this to the end:

| eval value=user . "-" . work
| eval ThisFieldIsJunk="junk"
| chart values(value) BY ThisFieldIsJunk unit | fields - ThisFieldIsJunk

View solution in original post

0 Karma

woodcock
Esteemed Legend

Just add this to the end:

| eval value=user . "-" . work
| eval ThisFieldIsJunk="junk"
| chart values(value) BY ThisFieldIsJunk unit | fields - ThisFieldIsJunk
0 Karma

vishal_bandavad
Explorer

Just need little correction in above query . i tried with following query

| eval value=user . "-" . work
| eval ThisFieldIsJunk="junk"
| chart values(value) over ThisFieldIsJunk  by unit unit | fields - ThisFieldIsJunk

Hope this would work

0 Karma

woodcock
Esteemed Legend

These are exactly equivalent (two different command syntax forms that do exactly the same thing).

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, ...