Dashboards & Visualizations

How to count or assign the number of event

andres91302
Communicator

I have a dataset that shows the logins by date and unique_session_code for each user that visits the webpage of a bakery. I am trying to come a code that allows me to  determine if this is the first, second, third and so on... visit of this customer in other words the "nth_visit"

USERLOG_DATETX_REV
ALEX30/04/2021uyjd
MARY30/04/2021dn89
DOLLY30/04/2021nqmd0
FRANK29/04/2021nsj456
MARY29/04/2021zlpa2
DOLLY29/04/2021s09dm
ALEX28/04/2021jds02
MARY28/04/2021kqos98
DOLLY28/04/2021uiskk0


|This would be my desired result:

USERLOG_DATETX_REVnth_visit
ALEX44314jds021
ALEX44316uyjd2
DOLLY44314uiskk01
DOLLY44315s09dm2
DOLLY44316nqmd03
FRANK44315nsj4561
MARY44314kqos981
MARY44315zlpa22
MARY44316dn893

A  table has the "nth_visit" to the website by each attempt of the visitor


Thank you so much guys

 

 

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| streamstats count as nth_visit by USER

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
| streamstats count as nth_visit by USER

andres91302
Communicator

Ok thanks so much for this... I didn't know about streamstats is that the command for whenever we wanna know the nth position solely? I thought we only had stats thank you so much

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

streamstats can be used for more than just finding the nth position.

0 Karma
Get Updates on the Splunk Community!

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...