Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
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