Alteryx Designer Desktop Discussions

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

Multi Row Subtraction - Dynamic Numbers to subtract

Cassie_Shaw
7 - Meteor

Alright. I am trying to get the total number of seconds an associate spends on a task (later this will be converted to hours, mins & secs). I have the data split by a blank row in between each associate. I am trying to use the multi row tool to say: If the cumulative seconds are null then subtract the last cumulative seconds from the one before for however many rows are above.

In the screen shot below I only have it subtracting two rows, 39348-39208. Does anyone know how to make the subtraction part of the formula dynamic, to accommodate however many rows are above?

Cassie_Shaw_0-1685042881274.png

Cassie_Shaw_1-1685042973288.png

Thanks


Cassie

7 REPLIES 7
binuacs
20 - Arcturus

@Cassie_Shaw One way of doing this

binuacs_0-1685047352630.png

 

Cassie_Shaw
7 - Meteor

@binuacs Hi! I am looking to subtract all values in the Cumm Sec column for each associate. I didnt know if there was a dynamic way to say subtract all values under "associate" A for example. 

binuacs
20 - Arcturus

@Cassie_Shaw @Can you provide some sample data and expected results?

Cassie_Shaw
7 - Meteor

@binuacs Sure. So in this example I would want the 140 to be 39208-32339 = 6869 then 39348 - 39208= 140 then 6869+140= 7009 this equal the total time worked that day. But the number of cases differs by associate, its not always 3. 

Cassie_Shaw_0-1685049269423.png

As I type this, I am starting to think I need another approach. :(

binuacs
20 - Arcturus

@Cassie_Shaw are you expecting the output like below sample data?

binuacs_0-1685050108323.png

 

binuacs
20 - Arcturus

@Cassie_Shaw Let me know if the attached workflow works for you or not.

binuacs_0-1685050584135.png

 

Cassie_Shaw
7 - Meteor

@binuacs THANK YOU! Yes, this formula helped me get my end result. I cant thank you enough. I literally worked on this ALL DAY!

Cassie_Shaw_0-1685060224963.png

 

Labels