Alteryx Designer Desktop Discussions

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

Replace Column data grouped by number based on most recent date

Nmassarone
8 - Asteroid

Hello, hoping someone could help with the following I've been messing around with this for a little while and cant seem to figure out a solution...

 

I have a list of accounts that I need to fill in the annual income based on the most recent date (if applicable). there a few rows of examples I have on my sheet I added a column (MSTR_ANN_INCOME) to try to get a single value for the asked & not answered and Not asked as those would need to be replaced as well.

 

For Examples Row 1 is the header column…

 

The 1st thing I would want to look for is if the group (of MSTR_NUM)  all have no then the annual income would be filled in with the number

 

Example Rows 2-4 – because 2 & 4 are NO it would fill in 2-4 with 50k – 100k

 

The 2nd thing I would want to look for is if there are 2 different MSTR_ANN_INCOME (besides the NO) that it picks the most recent date and fills in all with the most recent date Annual income.

 

Example Rows 5-7 because 6&7 have different annual incomes but row 6 has a more recent date rows 5-7 would be filled in with 25k – 50k

 

The 3rd thing I would want to look for is if there are no dates (NULL) then it would pick the highest amount and fill in with the highest.


Example Rows 19 – 21 because 20&21 are missing dates I would want it to take the 250k – 500k and fill in 19-20 with 250k – 500k

 

Rows 8-18 are additional data

 

Below is the starting chart

MSTR_NUMANNUAL_INC_DESCACCT_OPEN_DTNAF_or_BROKMSTR_ANN_INCOME
178439  1894NO
17843950K - 100K10/30/2017JV73750K - 100K
178439ASKED & REFUSED 93857NO
21958 2/18/20143312NO
2195825K - 50K6/19/2019H7019825K - 50K
2195850K - 100K4/9/2002209250K - 100K
84756 7/12/20184754NO
84756 5/20/20205816NO
8475625K - 50K7/23/2007963125K - 50K
84756ASKED & REFUSED7/26/20174090NO
84756NOT ASKED10/6/2015F54818NO
37372  16830NO
37372250K - 500K5/31/2019HV60705250K - 500K
37372500K+6/10/20195183387500K+
68673  445608NO
68673100K - 250K1/24/2020JA87640100K - 250K
68673ASKED & REFUSED 42376NO
94837 5/19/2008156868NO
94837100K - 250K 49464100K - 250K
94837250K - 500K 1768791250K - 500K

 

Below the last row (IDEAL COLUMN) is what i would want the results to be (the MSTR_ANN_INCOME row could be deleted)

MSTR_NUMANNUAL_INC_DESCACCT_OPEN_DTNAF_or_BROKMSTR_ANN_INCOMEIDEAL COLUMN
178439  1894NO50K - 100K
17843950K - 100K10/30/2017JV73750K - 100K50K - 100K
178439ASKED & REFUSED 93857NO50K - 100K
21958 2/18/20143312NO25K - 50K
2195825K - 50K6/19/2019H7019825K - 50K25K - 50K
2195850K - 100K4/9/2002209250K - 100K25K - 50K
84756 7/12/20184754NO25K - 50K
84756 5/20/20205816NO25K - 50K
8475625K - 50K7/23/2007963125K - 50K25K - 50K
84756ASKED & REFUSED7/26/20174090NO25K - 50K
84756NOT ASKED10/6/2015F54818NO25K - 50K
37372  16830NO500K+
37372250K - 500K5/31/2019HV60705250K - 500K500K+
37372500K+6/10/20195183387500K+500K+
68673  445608NO100K - 250K
68673100K - 250K1/24/2020JA87640100K - 250K100K - 250K
68673ASKED & REFUSED 42376NO100K - 250K
94837 5/19/2008156868NO250K - 500K
94837100K - 250K 49464100K - 250K250K - 500K
94837250K - 500K 1768791250K - 500K250K - 500K

 

Any help would be greatly appreciated.

 

thank you.

11 REPLIES 11
mceleavey
17 - Castor
17 - Castor

@Nmassarone ,

 

on the first sort tool I chose record ID rather than MSTR_NUM.

This is just a case of playing with this area to ensure it's in the order you want it.

 

M.



Bulien

Nmassarone
8 - Asteroid

@mceleavey i think i figured it out my original sheet already had the date column set to date so i think the date tool was putting it out of whack ... i removed that and everything flowed through perfect and got all the results so it was a success! 

 

thank you again for the post and all your help on this i really appreciate it.

 

Labels