Splunk Search

Merge multiple rows into one of a field

obularajud16
Explorer

With the below query I am able to get data as below(first one) and I need to convert it as second box

 

For the time field I am getting common values and i need to merge and combine them as shown. is there any way to achieve this, I've tried with values() but it is not working

 

obularajud16_0-1598881034465.png

 

 

sourcetype=access_combined | eval action = if(isnull(action) OR action="", "unknown", action) | bin _time span=102h  |eval Time=strftime(_time,"%Y-%m-%d %H:%M:%S") | stats  count as totals by action,Time | sort -Time,action

 

 

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Have you tried adding

...
| stats values(action) as action, values(totals) as totals by Time
| fields action, Time, totals

 

0 Karma

obularajud16
Explorer

Yes, but it's not worked. 

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...