Alteryx Designer Desktop Discussions

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

how to pick alternative record with highest count

kseniya_sbitneva
6 - Meteoroid

hi, i'm stuck on the part in one of the workflow that I'm writing. this might be an easy one to solve. For each original record (column A) I need to pick an alternative record with highest number value. example, for cost center code AB7612 the solution will be LH6493 (I would need to have all three columns in the output). for cost center code AD8533 solution will be PG0857. All the alternative cost center codes are unique numbers

Cost Center Code / Department Idaltern cc Cost Center Code / Department Idaltern cc Count
AB7612LH649327
AB7612DW86277
AD8533PG08577
AD8533TS7435
AD8533JE4631
AQ8166QG63523
AQ8166LT4651
BN0392OF0729
BN0392JT12188
BN0392TO53508
BN0392RQ55058
BN0392OS13276
BN0392KU22665
BN0392KD83265
BN0392WV64924
BN0392GD92033
BN0392KG39943
BN0392ZS50142
BN0392FT62252
BN0392KXD72232
BN0392JG8152
BN0392OH1841
BN0392JR64901
BN0392DG64911
BN0392GT44071
BN0392KY7701
BN0392YXS45801
PT1882PKO54501
LH4629PG1390128
LH4629KF415979
LH4629HGD339876
LH4629BCX88574
LH4629JCC133753
LH4629JVFC048350
LH4629KGV630847
LH4629BCF7210642
LH4629MV218041
LH4629JHG188237
LH4629SZD93937
LH4629LK818035
LH4629KM849535
LH4629KBV458830
LH4629HC41629
LH4629LCD52129
LH4629JNGV683428
LH4629MN83825
LH4629KHU251123
LH4629JGV174222
LH4629CKL568422
LH4629KHB608622
LH4629DFG519122
LH4629KLNH7020
LH4629VJB326719
LH4629KJB419519
LH4629FDX825818
LH4629KLHY887818
LH4629KNJ3518
LH4629SZ439718
LH4629HJB19518
LH4629FD045318
LH4629JBH45917
LH4629RD286617
LH4629BH519017
LH4629GCF2070616
LH4629LJKN1091716
LH4629GC31716
LH4629CF41716
LH4629UYG8315
LH4629GFC32115
LH4629KL202715
LH4629GCF174115
LH4629HGJN2915
LH4629CG470014
LH4629CFY419813
LH4629NM803213
LH4629UYG608813
LH4629CFR578213
LH4629ZSD761612
LH4629LBH9206112
LH4629FJXFG2312
LH4629CJD89012
LH4629CUK16211
LH4629 FXKJ42411
LH4629JGC349211
LH4629HC185411
LH4629LCG731811
LH4629FXK89011
LH4629GCHK477910
LH4629KCGX356310
LH4629XHVG160610
LH4629HC61510
LH4629KFCX526110
LH4629FKX31209
LH4629CKF1839
LH4629FJ0579
LH4629FKXY3129
LH4629CKX46039
LH4629KHCXF226949
LH4629KXF4949
LH4629DSZ07732
LH4629FJCX514112
LH4629GCLK392
LH4629KXFY57842
LH4629KYR13691
UT2043CKJ814518
UT2043KIG56171
UT2043GC60151
UT2043JGC24481
WQ8459MFGX805912
WQ8459KHGX945911
WQ8459FA9744811
WQ8459HGCXF274310
WQ8459GCGF33109
WQ8459MHCG74418
WQ8459NBCG4528
WQ8459KHGFX615167
WQ8459ZSR38977
WQ8459ETHA87326
WQ8459HGFX65485
WQ8459GIUVH80605
WQ8459MHGF74654
WQ8459 KFX74694
WQ8459KHC020643
WQ8459 HNJV4673
WQ8459XBNC65393
WQ8459JMNV42482
WQ8459BCGX823912
WQ8459JBCX74421
WQ8459JHGCD71411
WQ8459HCBH97151
WQ8459 VF197171
WQ8459BNV97181
WQ8459JBHCG8161
WQ8459BC74501
WQ8459NCDXG7311
YR6020HVCX25432
YR6020BKX02911
3 REPLIES 3
alexnajm
16 - Nebula

Like this?

Watermark
12 - Quasar
12 - Quasar

@alexnajm  has the simple answer in his example. Sort, then sample first record based on grouping the cost center code.  

kseniya_sbitneva
6 - Meteoroid

Thank you! This solved the example. I havent used sample function in my workflows previously and didnt think of it :)  

Labels