Missed the Q4 Fall Release Product Update? Watch the on-demand webinar for more info on the latest in Designer 24.2, Auto Insights Magic Reports, and more!
Free Trial

Alteryx Designer Desktop Discussions

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

Counting consecutive days

Deano478
12 - Quasar

Hey folks,

 

I have a bit of an issue I'm struggling with that could possibly be simple I'm not sure. What I have is a sample dataset as seen below that contains leave for dummy individuals. What I am trying to do is based on the Leave_Date column is get a count of how many consecutive days a person if off for.

 

Below is a sample of the data albeit cleaned up to look nice.

 

Hopefully that makes sense

 

NameIDLeave_DateLeave_TypeApprovedYearEmail
Dean118/04/2023Annual Leave12023dean@test.com
Dean119/04/2023Annual Leave12023dean@test.com
Dean120/04/2023Annual Leave12023dean@test.com
Dean121/04/2023Annual Leave12023dean@test.com
Dean124/04/2023Sick Leave12023dean@test.com
Dean125/04/2023Sick Leave12023dean@test.com
Tom226/04/2023Sick Leave12023Tom@test.com
Tom227/04/2023Sick Leave12023Tom@test.com
Tom228/04/2023Sick Leave12023Tom@test.com
Tom229/04/2023Annual Leave12023Tom@test.com
Tom202/05/2023Annual Leave12023Tom@test.com
4 REPLIES 4
Luke_C
17 - Castor
17 - Castor

Hi @Deano478 

 

I think the multi-row formula tool could help, how does something like this look? It uses the date time functions to check if the row is 1 day more than the previous record. This might get hairy depending on how you want to account for weekends. 

Luke_C_0-1681826357269.png

 

 

FinnCharlton
13 - Pulsar

Hi @Deano478, here's a way to do it with a multi-row formula:

FinnCharlton_0-1681826620515.png

 

Clifford_Coon
11 - Bolide

Hi Deano,

 

A multi-row formula works here.

 

convert to Alteryx date, sort and use multi-row formula.

Annotation 2023-04-18 100624.jpg

Deano478
12 - Quasar

@Luke_C @FinnCharlton  and @Clifford_Coon  much appreciated for you taking the time to gimme a hand the use of the Multi Row formula worked like a charm. Its definitely a tool I need to get more familiar with

Labels
Top Solution Authors