Free Trial

Alteryx Designer Desktop Discussions

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

Calculating Sequential Differences

WassimAB
7 - Meteor

Hi Alteryx Community,

 

I have an input table with customer balances from `x1` to `x720`. I'm looking to calculate two sets of sequential differences across these columns:

 

1. **`M`**: The difference between consecutive balances (e.g., `M1 = x1 - x2`, `M2 = x2 - x3`, ..., `M719 = x719 - x720`).

2. **`MT`**: The difference between consecutive `MT` values (e.g., `MT1 = M1 - M2`, `MT2 = M2 - M3`, ..., `MT718 = M718 - M719`).

 

Here’s a small example for clarity:

 

Input Table:

 

CIDX1X2X3X4X718X719X720
ABC1000350750-87550010008000
XYZ50004500-9000300010007892

 

**Desired Output Table:**

 

CIDX1X2X3X4X718X719X720M1M2M3...M718M719MT1MT2….MT718
ABC1000350750-87550010008000650-4001625...-500-70001050-2025….6500
XYZ50004500-900030001000789250013500-12000...100-7892-1300025500….7992

 

 

Given that I need to handle 720 columns, I'm seeking advice on the most efficient way to set this up in Alteryx. Any suggestions on tools, workflows, or scripting techniques that could streamline this process would be greatly appreciated!

 

Thanks in advance for your help!

0 REPLIES 0
Labels
Top Solution Authors