We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
fireworks
SOLVED

Number of consecutive days a person logs on, ignoring weekends

craigja
11 - Bolide

Im struggling with this one!  I have a dataset of peoples logon dates and the country they logged on in

 

So:

Name          Logon Country                  Date

Craig            UK                                            2023-04-10

Craig            UK                                            2023-04-11

Craig            UK                                            2023-04-12

Craig            UK                                            2023-04-13

Craig            UK                                            2023-04-17

Craig            UK                                            2023-04-18

Craig            UK                                            2023-04-19

Craig            UK                                            2023-04-20

 

I want to count the number of consecutive days each person logs on if they are in the same country as the day before (Or the Friday before if today is a Monday), ignoring the weekend.  So in the example above, I would want to get 4 - since Craig logged on Mon-Thurs both weeks, so 2 counts of 4, I cannot get my head round how to do this!

2 REPLIES 2
DataNath
17 - Castor
17 - Castor

Hey @craigja, I can get you a running count of consecutive days but not sure how you want to present the final results:

 

DataNath_0-1682351672518.png

craigja
11 - Bolide

That looks like it will work, or at least is a great starting point!  Manny thanks

Labels
Top Solution Authors