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.
SOLVED

Need to remove duplicates while keeping some of the same values

Nmassarone
8 - Asteroid

Hello, New to Alteryx trying to figure out how to get the following and hoping someone could help.

 

I have a list of accounts and annual incomes that I’m trying to filter down but running into an issue when trying to remove duplicates.

 

I’m trying to get the below sheet as followed…

 

Row 2 and 3 to keep both of these.

 

Row 4,5, and 6 something like would like to only keep 1 of the “0” AnnIncomeCode because the Annual Income is the same so looking to delete either row 4 or 6 along with keeping the NULL row in 5 so the only results would be the NULL (row 5) and either 4 or 6.

 

Row 7 through 10 this one since there are 3 0’s but 2 different AnnIncomeCode would like to only display row 7, 8 and 10 and remove 1 of the duplicate MSTRNUM_ANNIC but then keep the non-duplicate.

 

The issue I’m running into is the last set of number row 11 through 13, something like this I want to keep anything that is displayed as a -1 (which is a NULL value in ANN_INC_DESC) so for this would like to keep row 11, 12 and 13.

 

When I remove duplicates both 12 and 13 would be deleted but trying to keep anything with a -1 (as missing Annual income)

 

Below row 13 is just some additional data for the sheet but quick example row 17-21 something like this would like to keep row 17,18 because they are different remove 19 and 21 because they are duplicates of 18 and keep 20 because its NULL. Also 22 -25 if 22 could be removed and it would only be rows 23,34, and 25.

 

Hopefully this is enough information any help would be greatly appreciated.

 

Current List as Is

MSTR_NUMConcat_AnnInCodeANNUAL_INC_DESCAnnIncomeCodeSSN_and_ANNINC
12426970,-150K - 100K01242697/50K - 100K
12426970,-1 -11242697/
5678940,-1,050K - 100K0567894/50K - 100K
5678940,-1,0 -1567894/
5678940,-1,050K - 100K0983203/50K - 100K
9832030,0,0,-1250K - 500K0983203/250K - 500K
9832030,0,0,-150K - 100K0983203/50K - 100K
9832030,0,0,-1250K - 500K0983203/250K - 500K
9832030,0,0,-1 -1983203/
73293310,-1,-150K - 100K07329331/50K - 100K
73293310,-1,-1 -17329331/
73293310,-1,-1 -17329331/
456833-1,0,0 -1456833/
456833-1,0,050K - 100K0456833/50K - 100K
456833-1,0,050K - 100K0456833/50K - 100K
2954720,0,0,-1,025K - 50K0295472/25K - 50K
2954720,0,0,-1,050K - 100K0295472/50K - 100K
2954720,0,0,-1,050K - 100K0295472/50K - 100K
2954720,0,0,-1,0 -1295472/
2954720,0,0,-1,050K - 100K0295472/50K - 100K
674380,-1,-150K - 100K067438/50K - 100K
674380,-1,-150K - 100K067438/50K - 100K
674380,-1,-1 -167438/
674380,-1,-1 -167438/

 

 

Would like it to display the following

MSTR_NUMConcat_AnnInCodeANNUAL_INC_DESCAnnIncomeCodeSSN_and_ANNINC
12426970,-150K - 100K01242697/50K - 100K
12426970,-1 -11242697/
5678940,-1,0 -1567894/
5678940,-1,050K - 100K0983203/50K - 100K
9832030,0,0,-1250K - 500K0983203/250K - 500K
9832030,0,0,-150K - 100K0983203/50K - 100K
9832030,0,0,-1 -1983203/
73293310,-1,-150K - 100K07329331/50K - 100K
73293310,-1,-1 -17329331/
73293310,-1,-1 -17329331/
456833-1,0,0 -1456833/
456833-1,0,050K - 100K0456833/50K - 100K
2954720,0,0,-1,025K - 50K0295472/25K - 50K
2954720,0,0,-1,0 -1295472/
2954720,0,0,-1,050K - 100K0295472/50K - 100K
674380,-1,-150K - 100K067438/50K - 100K
674380,-1,-1 -167438/
674380,-1,-1 -167438/
2 REPLIES 2
gabrielvilella
14 - Magnetar

Hi @Nmassarone, I believe what you want is to remove duplicates for MSTR_NUM and ANNUAL_INC_DESC only when the AnnIncomeCode is 0. See attached:

gabrielvilella_0-1644340932951.png

 

Nmassarone
8 - Asteroid

Awesome thank you so much @gabrielvilella that worked perfect appreciate the time looking into this.

Labels
Top Solution Authors