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!
Solved! Go to Solution.
@Himanshu_Panchal
You should be able to do it with Multi Row Formula Tool or with Formula Tool, both should work.
My suggestion create the automation to handle correctly one set of data and then place it in a Batch Macro to repeat it for each of the rows.
Thanks OTrieger for responding on my request, but can you please help with details about how to achieve it? If you want I can create and share a sample flow for you to check and respond on it with changes?
I wanted to let everyone know that I’ve found a solution to my query thread titled “Updating Column Values Based on Counter Logic in Alteryx Workflow.” With the help of ChatGPT - Copilot, I created a flow using the Multi-Row Formula tool to implement the logic for a counter column cycling from 1 to 4. Initially, it was confusing, but by using multiple Multi-Row Formula tools—four for setting the logic when the counter equals 3, four more for when the counter equals 4, and two additional ones for the final counter value of 4—I was able to resolve the issue. To assist others who might face similar challenges, I’ve attached my sample solution flow along with the sample input and output files for reference. Thanks for reading my thread! Happy automating, everyone.