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:
CID | X1 | X2 | X3 | X4 | … | X718 | X719 | X720 |
ABC | 1000 | 350 | 750 | -875 | … | 500 | 1000 | 8000 |
XYZ | 5000 | 4500 | -9000 | 3000 | … | 100 | 0 | 7892 |
**Desired Output Table:**
CID | X1 | X2 | X3 | X4 | … | X718 | X719 | X720 | M1 | M2 | M3 | ... | M718 | M719 | MT1 | MT2 | …. | MT718 |
ABC | 1000 | 350 | 750 | -875 | … | 500 | 1000 | 8000 | 650 | -400 | 1625 | ... | -500 | -7000 | 1050 | -2025 | …. | 6500 |
XYZ | 5000 | 4500 | -9000 | 3000 | … | 100 | 0 | 7892 | 500 | 13500 | -12000 | ... | 100 | -7892 | -13000 | 25500 | …. | 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!