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.
SOLVED

Consecutive days but extract the correct rows

DanielCarro
8 - Asteroid

Hi guys,

 

I am trying to figure this one out.

 

INPUT       OUTPUT    
IDTypeDateDaysConsecutiveDays IDTypeDateDaysConsecutiveDays
1Sick04/07/202411  1Sick05/07/202412
1Sick05/07/202412  2Sick02/07/202411
2Sick02/07/202411  2Sick23/07/202412
2Sick22/07/202411       
2Sick23/07/202412       

 

on the left is the data I have and the output that I want is on the right.

The issue is on ID '2', this individual has been sick on 02/07 and 22/07+23/07, so if there are any consecutive days these are added as in the case of 22 and 23 July; but the 02/07 needs to stay alone as it isn't consecutive.

 

Any ideas on how to get the right output

 

Many thanks,

Dan

2 REPLIES 2
diegosantos
8 - Asteroid

Hi @DanielCarro.

 

You can achive this with:

Formula: DanielCarro.pngToDate(Left(DateTimeAdd([DateTime_Out],1,"days"),10)) = [Row+1:DateTime_Out]

 

 

DanielCarro
8 - Asteroid

Hi @diegosantos ,

 

it worked perfectly, thank you so much

Labels
Top Solution Authors