Alteryx Designer Desktop Discussions

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

Subtract time within same row set (determined by another column)

MrDaniels
6 - Meteoroid

Hi gurus,

 

Hopefully you can give me a hand.

 

I want to subtract the time between statuses (rows) within a same set.

 

For the attached example:

 

AllocationCodeTimestatusAllocation_Duration
232/08/2020 6:3010
232/08/2020 6:37500.125833333
232/08/2020 6:56600.315555556
232/08/2020 7:10630.225277778
232/08/2020 7:20670.166666667
232/08/2020 7:32700.200555556
232/08/2020 7:44800.205555555
232/08/2020 8:32850.801944445
232/08/2020 8:41900.151944445
232/08/2020 9:26999990.747222222
252/08/2020 8:0010
252/08/2020 9:03501.056666667
252/08/2020 9:40600.6225
252/08/2020 9:59630.316944444
252/08/2020 10:14670.246388889
252/08/2020 10:24700.164166667
252/08/2020 11:09800.7525
252/08/2020 11:37850.470277778
252/08/2020 11:43900.092777778
252/08/2020 12:57999991.243333333

 

I need to subtract each time row within the same Allocation Code. My desire result is Allocation Duration column.

 

Status 1 is the start of the set, and 99999 is the end of the set. The data set will be sorted at status level and Allocation code.

 

Thanks in advance,

 

Cheers.

 

MrD

 

 

 

 

 
 

 

 
 

 

 

 

2 REPLIES 2
wwatson
12 - Quasar

You could try something like this:

 

wwatson_0-1596445114605.png

 

MrDaniels
6 - Meteoroid

Thanks wwatson, 

 

Very clean and easy solution.!!!

 

Brilliant

 

🙂

Labels