Alteryx Designer Desktop Discussions

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

Adding a Multiple Field and Row Conditional Column

Venkatasai541
6 - Meteoroid

Hi Guys,

 

I have an input table like this which consists of document numbers with auto-posting (Auto Line) Yes or No:

Document NumberDebit/ CreditAmountAuto Line
1900000000Debit100X
1900000000Credit100X
1900000001Debit200 
1900000001Credit200 
1900000002Debit100X
1900000002Debit100 
1900000002Credit100X
1900000002Credit100 

 

I want to add a column "Manual Entry?" which shall identify the documents which are not auto-posted on complete document number basis.

 

Conditions:

1. For the same document number if both debit and credit Iines are auto-posted then in the 'Manual Entry' column - "No" should be updated.

2. If either debit/ credit is auto-posted or both debit, credits are not auto-posted then the column should be updated as "Yes".

 

Output table should be like this:

Document NumberDebit/ CreditAmountAuto LineManual Entry?
1900000000Debit100XNo
1900000000Credit100XNo
1900000001Debit200 Yes
1900000001Credit200 Yes
1900000002Debit100XYes
1900000002Debit100 Yes
1900000002Credit100XYes
1900000002Credit100 Yes

 

 

Can anyone help me with this problem without using Cross Tab?

3 REPLIES 3
DavidP
17 - Castor
17 - Castor

Have a look at the attached to see if that works for you.

 

DavidP_0-1594420668588.png

 

Venkatasai541
6 - Meteoroid

@DavidP - Thanks for your quick response.

 

The input lines are not standard. Sometimes for a single document number, there can be 20 line items also.

 

Your workflow is working for the given input but if I change the input as follows it is not working:

Try #1:

Document NumberDebit/ CreditAmountAuto Line
1900000000Debit100X
1900000000Credit100X
1900000001Debit200 
1900000001Credit200 
1900000002Debit100X
1900000002Debit100 
1900000002Credit100X
1900000002Credit100 
1900000002Debit100X
1900000002Credit100 

 

Final Output #1:

Document NumberDebit/ CreditAmountAuto LineManual Entry
1900000000Debit100XNo
1900000000Credit100XNo
1900000001Debit200 Yes
1900000001Credit200 Yes
1900000002Debit100XYes
1900000002Debit100 Yes
1900000002Credit100XYes
1900000002Credit100 Yes
1900000002Debit100XYes
1900000002Credit100 Yes

 

Try #2:

Document NumberDebit/ CreditAmountAuto Line
1900000000Debit100 
1900000000Credit100 
1900000001Debit200 
1900000001Credit200 
1900000002Debit100 
1900000002Debit100 
1900000002Credit100 
1900000002Credit100 
1900000002Debit100 
1900000002Credit100 

 

Final Output #2:

Document NumberDebit/ CreditAmountAuto LineManual Entry
1900000000Debit100 Yes
1900000000Credit100 Yes
1900000001Debit200 Yes
1900000001Credit200 Yes
1900000002Debit100 Yes
1900000002Debit100 Yes
1900000002Credit100 Yes
1900000002Credit100 Yes
1900000002Debit100 Yes
1900000002Credit100 Yes

 

I have created the workflow using crosstab by creating columns at "Auto Line". The only issue is if there is no "x" in the column then the workflow is failing like in Try #2. (Attached the workflow)

 

-

Venkat

Venkatasai541
6 - Meteoroid

@DavidP  I got the solution. I just made some changes to your workflow and now it is working. Thanks.

 

Attached the workflow.

 

-

Venkat

Labels