Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Calculating Difference two rows based on same ID

twildhart
7 - Meteor

I have a table of data of Actuals vs Planned results. 

What I would like to do is calculate the delta of Plan vs Actual and sort by the worst delta in the last month. 

twildhart_2-1679602215160.png

 

Then the output looks like the following with the last month sorted by the the worst Delta so I can identify the place I need to focus. 

twildhart_3-1679602241640.png

 

 

4 REPLIES 4
binuacs
21 - Polaris

@twildhart One way of doing this with the batch macro

 

binuacs_0-1679608791086.png

 

twildhart
7 - Meteor

Thank you! I will try this. 

twildhart
7 - Meteor

binuacs,

 

This worked great thank you. I have since built the workflow with the expanded data set and have decided that it would be better to have the ID repeat all the way down matching to the ID's Plan and Delta rather than grouping and having a Null there. I am Really  new to Macros and can't seem to make out how to leave the ID lables in the output. Can you help me with that? 

binuacs
21 - Polaris

@twildhart updated workflow attached. Let me know if you need any further assistance

 

binuacs_0-1680113946686.png

 

Labels
Top Solution Authors