Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

How to create a column for offsetting accounts

Vu_Doan
5 - Atom

Hi all,

 

I'm new to this community. Please kindly help to advise on my problem. My set of data is as follows:

 

NoDateCodeClient codeNameJE descriptionAccount codeDebitCredit
105/01/2022BN43/20NC60001Mr. AExpense64253.000.0000
105/01/2022BN43/20NC60001Mr. AExpense1121103.000.000
7614/01/2022BN44/20NC00001Mr. BFA purchase24111300.000.000.0000
7614/01/2022BN44/20NC00001Mr. BFA purchase6428311.0000
7614/01/2022BN44/20NC00001Mr. BFA purchase112110300.000.011.000

 

I would like my output as follows:

 

NoDateCodeClient codeNameJE descriptionAccount codeOffset accountDebitCredit
105/01/2022BN43/20NC60001Mr. AExpense6425112113.000.0000
105/01/2022BN43/20NC60001Mr. AExpense11211642503.000.000
7614/01/2022BN44/20NC00001Mr. BFA purchase2411111211300.000.000.0000
7614/01/2022BN44/20NC00001Mr. BFA purchase642831121111.0000
7614/01/2022BN44/20NC00001Mr. BFA purchase11211241110300.000.000.000
7614/01/2022BN44/20NC00001Mr. BFA purchase1121164283011.000

 

Thank you very much!

 

Best regards,

8 REPLIES 8
caltang
17 - Castor
17 - Castor

Hi @Vu_Doan,

 

Kindly confirm the following:

1. Is that all from the raw data? 

2. Is the full-stop meant to be a comma? For example 11.000 -> That is 11k (11,000.00) right?

3. How can you ascertain that the account 64283 has a Credit of 11,000.00 whilst account 24111 has 300,000,000,000? 

 

If you can give more details that will be most helpful.

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Vu_Doan
5 - Atom

Hi @caltang



Please see my responses:

1. This is just part of the data. If you'd like, I can post the whole raw data.

2. Yes, it is. 

3. We would have to rely on the first column to identify a specific JE. JE no. 76 looks like this on paper:

Dr 24111

Dr 64283

Cr 11211

 

Then we know that the total amount recorded in Acc. 11211 must be equal to the amount recorded in both Acc. 24111 and Acc. 64283.

 

binuacs
21 - Polaris

@Vu_Doan What is the logic to calculate the offset account?

caltang
17 - Castor
17 - Castor

I'm not sure if this works, but can you test this?

caltang_0-1676728905303.png

 

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Vu_Doan
5 - Atom

Hi binuacs,

 

The logic is that we rely on column "No" as the unique JE identifier. Please see the illustrative table as belows:

For JE no. 1, it looks like this:

Dr Expense

Cr Cash

 

and JE no. 76:

Dr PPE

Dr Expense

Cr Cash

Vu_Doan_0-1676773197308.png

 

I hope this helps.

 

Vu_Doan
5 - Atom

Hi caltang,

 

I've tried your flow. I think that you're really close, but there seems to be a bit issue. I noticed that some entries are not transformed correctly as belows:

 

Input

 

Vu_Doan_0-1676773333585.png

 

Output

Vu_Doan_1-1676773348920.png

 

I also attached the raw data. Do you have any further suggestions?

caltang
17 - Castor
17 - Castor

Hi @Vu_Doan,

 

Thanks for the sample dataset. My apologies, I was on holiday the past week and I went abroad to solve Alteryx use-cases in person. 

 

I'll look into your issue again this week when time permits, but I think you can use my workflow still and make some adjustments to meet those exception cases.

 

 

Regards,

Cal

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
caltang
17 - Castor
17 - Castor

Hi @Vu_Doan !

 

Really sorry for the late reply. I was sent abroad for a few weeks for work and had to rush for several trips in succession.

 

Please find the new workflow as follows. Try it and let me know.

 

 

Best,

Cal

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Labels
Top Solution Authors