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!

.conf23 Registration is Now Open!

Time to toss the .conf-etti 🎉 —  .conf23 registration is open!   Join us in Las Vegas July 17-20 for ...

Don't wait! Accept the Mission Possible: Splunk Adoption Challenge Now and Win ...

Attention everyone! We have exciting news to share! We are recruiting new members for the Mission Possible: ...

Unify Your SecOps with Splunk Mission Control

In today’s post, I'm excited to share some recent Splunk Mission Control innovations. With Splunk Mission ...