Alteryx Designer Desktop Discussions

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

Subtract two rows from each other and build new row as a result

MaxSchG
7 - Meteor

Dear Community, 

 

I would like to substract two data series (over time below each other) from each other. After that would like to have the result as new column. Is that possible? 

 

Cashflow.PNG

 

 

Attached is the workflow.

 

Thank you,

Max

9 REPLIES 9
vizAlter
12 - Quasar

Hi @MaxSchG — Can you attach sample file for input, and desired output file, both as well?

Maskell_Rascal
13 - Pulsar

Hi @MaxSchG 

 

So I'm thinking something like the below would work. You'd need to use a combination of Transpose and Crosstab tools. I've attached a sample workflow for you to use. Please note that this is only built to work with two rows in a data source. If you have several rows you'd like to do this to, then there are some additional steps that would need to be taken to get it to work. 

 

Maskell_Rascal_0-1600870253537.png

 

If this solves your issue please mark the answer as correct, if not let me know!

 

Thanks!

Phil

MaxSchG
7 - Meteor

Thank you so much for your quick response! 

 

It looks very similar to what I want to accomplish. Please take a look at my drawing cause it shows you what kind of ouput I would like to have: 

 

MaxSchG_0-1600874692662.png

 

 

I also attached my input (see in picture under current) so you can try to work on it with the actual dataset. 

 

Feel free to ask more questions. 

 

Max

 

Maskell_Rascal
13 - Pulsar

Hey @MaxSchG 

 

If I'm reading your drawing correctly, you only want the two rows subtracted but flipped to columns and summarized by Month/Year. If that's the case, we can pull the data out at a different point in the workflow I sent you and add a couple more tools to get the results. Looks like this, and I've attached an updated workflow. 

Maskell_Rascal_0-1600876127930.png

 

If this solves your issue please mark the answer as correct, if not let me know!

 

Thanks!

Phil

MaxSchG
7 - Meteor

@Maskell_Rascal 

 

Hey, thank you so much, thats almost the perfect output. The only adaption of the workflow would be to not seperate the months and year, just leave the date as it is. That would be perfect! Could you do that?

 

Thank you so much!

Maskell_Rascal
13 - Pulsar

@MaxSchG 

 

Are you looking for it by Month or by the actual date?

 

Thanks!

Phil

MaxSchG
7 - Meteor

@Maskell_Rascal 

 

by Year-Month-Day, just like you found it in the raw data set that I uploaded for you 🙂 

 

Thanks,

Max

Maskell_Rascal
13 - Pulsar

@MaxSchG 

 

Got it! That makes it easier. See attached workflow. 

Maskell_Rascal_0-1600877381401.png

If this solves your issue please mark the answer as correct, if not let me know!

 

Thanks!

Phil

MaxSchG
7 - Meteor

You made my day - what a pro! 

 

Thanks, 

Max

Labels