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!

Updated Data Type Articles, Anniversary Celebrations, and More on Splunk Lantern

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

A Prelude to .conf25: Your Guide to Splunk University

Heading to Boston this September for .conf25? Get a jumpstart by arriving a few days early for Splunk ...

4 Ways the Splunk Community Helps You Prepare for .conf25

.conf25 is right around the corner, and whether you’re a first-time attendee or a seasoned Splunker, the ...