Hello Alteryx Community,
I'm working on a workflow to update Entered Debit, Entered Credit, Accounted Debit, and Accounted Credit columns based on a Counter column cycling from 1 to 4. Here's the logic I aim to implement using only the Formula Tool:
Counter = 2: If the previous row (Counter = 1) has balances in Entered Debit and Accounted Debit, these should be mirrored in Entered Credit and Accounted Credit , respectively or or vice-a-verse.
Counter = 3: Use the balance from Accounted Credit of the previous row (Counter = 2) and place it in Entered Debit. Clear Accounted Debit and Accounted Credit .
Counter = 4: Use the balance from Entered Debit of the previous row (Counter = 3) and place it in Entered Credit. Clear Accounted Debit and Accounted Credit.
Repeat the process for subsequent sequences.
I've attempted to use conditional logic in the Formula Tool, but the outcome isn't as expected. We've also tried using the Multi-Row Formula Tool, but it didn't produce the required results either.
Could anyone provide insights or suggestions on achieving this using the Formula Tool or any other way around?
I'm attaching the output files for both multi row formula tool output and formula tool output.
Thank you for your help!