Alteryx Designer Desktop Discussions

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

Subtraction with result below

BradBaker
7 - Meteor

I would like to subtract one row from the row above and put the answer below - like a normal subtraction equation.  The attached workflow has the answer in a new column and contains a negative value I do not want in my report.  The goal is to show that the beginning count of a workflow is the same as the ending, i.e. we didn't drop any rows in the workflow.

 

The goal is for it to look like this:

 

1072

1072

     0

 

Thanks for your help.

4 REPLIES 4
MarqueeCrew
20 - Arcturus
20 - Arcturus

@BradBaker ,

 

I'd like to offer you a different approach to this challenge.  The TEST tool allows you to connect the Input tool (output anchor) to it as #1 and the input to the OUTPUT tool (connection #2) and will compare the two values.  If there is a difference, it will create an ERROR Message for you.

 

You can go further with this and prevent any output from writing out too.  

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
BradBaker
7 - Meteor

Thanks.  That definitely works for count of rows.  What about instances where I'm comparing two sums?

estherb47
15 - Aurora
15 - Aurora

Hi @BradBaker 

 

@MarqueeCrew 's tools are so amazing. If you haven't downloaded them yet, you need to. Trust me on that (and no, I get no kickbacks for promotion)

Here's another approach, though I may have complicated it. I rearranged the data so that you can use a formula tool to calculate the difference, with Transpose and Crosstab. Then Transpose and Crosstab again rearrange the data to the original format. No extra negative numbers. And this can accommodate multiple differences you want to calculate. 

 

Give it a go and let me know what you think.

 

Best,

Esther

image.png

BradBaker
7 - Meteor

Thanks @estherb47.  That definitely works.  It seems like a long way to do it, but it does work.

Labels