We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Formula or logic needed to match various criteria

cterrence
8 - Asteroid

Hi All

Could you please assist, 

 

Project

I need to reconcile a statement using multiple criteria

I have attached a file which contains a sample source and the finished result I want

 

Task 1 - Need to extract the first column (A Number) based on first 4 digits - Completed

Task 2 - Need to extract the column  (A Account) based on last 4 digits - Completed

For eg


Now the main task

A NumberVoucherDateA Account Amount JALA
1000-035324ABJ00000462330/06/20221026150-2235-AB0751-8340-  1,500,000.0010008340
1000-035324ABJ00000462330/06/20223025200-2235-AB0751-8340    1,500,000.0010008340
1000-035324ABJ00000462330/06/20221026150-2235-AB0751-8234-        25,000.0010008234
1000-035324ABJ00000462330/06/20223025200-2235-AB0751-8234          25,000.0010008234
1000-006139ABJ00000233930/06/20213025200-2235-AB0751-8245-        45,000.0010008245
8245-006787ABJ00000239830/06/20211026150-2235-AB0751-1000          45,000.0082451000
8245-006787ABJ00000239830/06/20211026150-2235-AB0751-1000            1,500.0082451000

 

If data extracted from task 1 and task 2 matches with date column (Date) and amount column (Amount) then give me a Match else give No Match

 

Points
1. The data in JA and LA can come in any order like the ones I have highlighted in bold
2. All the matching criteria could be anywhere in the source. 

I was thinking of adding a helper column where I add column  JA and LA and use the helper as a lookup to match amount and date


Please help

13 REPLIES 13
caltang
17 - Castor
17 - Castor

Based on your logic @cterrence - the last row should be "No", no?

 

image.png

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

What is your defined logic in joining the fields? Can you lay it out clearly in bullet points so we all understand what you're trying to do?

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
cterrence
8 - Asteroid

Thank you for the time and reply @caltang 

 

  1.  JA and LA which are extracted columns are one of the main column for us to reconcile. The data to check can exist anywhere in the data source in any order like in the example below. Please see - 1000 and 8245. It can be in reverse order or same order

Eg 1

JALA
10008245
10005245
10005820
10006578
82451000

 

Eg 2

JALA
10008245
10005245
10005820
10006578
10008245

 

Please note that  we are clearing out all the transactions that meet the conditions. There are conditions that it has to satisfy 

  1. Based on JA/LA column...we have to match the date and amount column. 
    1. If the data in JA/LA is same and if the corresponding  data in date and amount is the same, then give "Match" else give me "Does not Match". Please see example 

 

DateAmountJALAStatus
30/06/2023-500010008245Match
30/06/202350010005245Does not Match
30/06/202325010005820Does not Match
30/06/2023100010006578Does not Match
30/06/2023500082451000Match
1/07/2023100082451000

Does not Match

 

 

I have attached a sample data. Please check column F (manual entry) for the logic.

 

Thank you 

CT

caltang
17 - Castor
17 - Castor

Using your new data, shouldn't it be:

 

RecordID A Number Voucher Date A Account  Amount  Result
1 1000-035324 ABJ000004623 30/6/2022 1026150-2235-AB0751-8340 -1,500,000.00 Yes
2 1000-035324 ABJ000004623 30/6/2022 3025200-2235-AB0751-8340 1,500,000.00 Yes
3 1000-035324 ABJ000004623 30/6/2022 1026150-2235-AB0751-8234 -25,000.00 Yes
4 1000-035324 ABJ000004623 30/6/2022 3025200-2235-AB0751-8234 25,000.00 Yes
5 1000-006132 ABJ000002332 30/6/2021 3025200-2235-AB0751-8234 -25,000.00 No
6 1000-035324 ABJ000004623 30/6/2022 1026150-2235-AB0751-8245 -125,000.00 Yes
6 1000-035324 ABJ000004623 30/6/2022 1026150-2235-AB0751-8245 -125,000.00 Yes
7 1000-035324 ABJ000004623 30/6/2022 3025200-2235-AB0751-8245 125,000.00 Yes
8 1000-006139 ABJ000002339 30/6/2021 3025200-2235-AB0751-8245 -45,000.00 No
9 8245-006787 ABJ000002398 30/6/2021 1026150-2235-AB0751-1000 45,000.00 No
10 8245-006787 ABJ000002395 30/6/2021 3025200-2235-AB0751-8340 -1500 No
11 8245-006787 ABJ000002395 30/6/2021 3025200-2235-AB0751-8340 -1500 No
12 1000-035324 ABJ000004623 30/6/2022 3025200-2235-AB0751-8245 125000 Yes
13 1000-006139 ABJ000002339 30/6/2021 3025200-2235-AB0751-8245 -45000 No
Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
cterrence
8 - Asteroid

Hi  @caltang 

Thanks you for your reply

I have updated my comments here. I have added extra columns for your reference.  I have highlighted the items in bold for your review

 

dIDA NumberVoucherDateA Account Amount JALAResultSt
11000-035324ABJ00000462330/06/20221026150-2235-AB0751-8340-1,500,000.0010008340YesCorrect
21000-035324ABJ00000462330/06/20223025200-2235-AB0751-83401,500,000.0010008340YesCorrect
31000-035324ABJ00000462330/06/20221026150-2235-AB0751-8234-25,000.0010008234YesCorrect
41000-035324ABJ00000462330/06/20223025200-2235-AB0751-823425,000.0010008234YesCorrect
51000-006132ABJ00000233230/06/20213025200-2235-AB0751-8234-25,000.0010008234NoCorrect
61000-035324ABJ00000462330/06/20221026150-2235-AB0751-8245-125,000.0010008245YesCorrect
61000-035324ABJ00000462330/06/20221026150-2235-AB0751-8245-125,000.0010008245YesCorrect
71000-035324ABJ00000462330/06/20223025200-2235-AB0751-8245125,000.0010008245YesCorrect
81000-006139ABJ00000233930/06/20213025200-2235-AB0751-8245-45,000.0010008245NoIncorrect. This transactions matches. Dates, amount, JA and LA match. Do note that JA and LA is interchanged. 
98245-006787ABJ00000239830/06/20211026150-2235-AB0751-100045,000.0082451000NoIncorrect. Same as above. Above transaction is related 
108245-006787ABJ00000239530/06/20213025200-2235-AB0751-8340-150082458340NoCorrect
118245-006787ABJ00000239530/06/20213025200-2235-AB0751-8340-150082458340NoCorrect
121000-035324ABJ00000462330/06/20223025200-2235-AB0751-824512500010008245YesCorrect
131000-006139ABJ00000233930/06/20213025200-2235-AB0751-8245-4500010008245NoCorrect
caltang
17 - Castor
17 - Castor

Okay, the LA / JA switch may cause some issues. Try this workflow and see.

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
cterrence
8 - Asteroid

Hi @caltang 

 

It seems that the query worked successfully for most transactions, but for some transactions, even though they were only one transaction, the result erroneously displayed as "Yes"

 

RecordIDA NumberDateA AccountAmountResult
281000-0068982022-03-161026150-2235-524022500000Yes
331000-0140652022-05-111026150-2235-524020300000Yes
481000-0227572022-11-221026150-2235-552015000000Yes
15240-0353242022-06-301026150-2235-5340-244287842.27Yes
25240-0353242022-06-301026150-2235-5340244287842.27Yes
38195-0353242022-06-301026150-2235-8234-137671151.58Yes
48195-0353242022-06-303025200-2235-8234137671151.58Yes
68195-0353242022-06-301026150-2235-8245-83265564.78Yes
78195-0353242022-06-303025200-2235-824583265564.78Yes
caltang
17 - Castor
17 - Castor

Huh? Ye - what ?

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
cterrence
8 - Asteroid

Reposted the comment

Labels
Top Solution Authors