Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a set of part numbers (MahleCram and Trimmed) that match each other, but some numbers are better matches than others. How closely they match is based off the parity; ranging from AA to AI. AA, AB, AC etc being the best matches and AD, AF etc have more differences.
I want to pull into a column only the best matching number and make it so the second best matching number is not even listed; so there are no duplicates.
An example is Mahlecram number 72112. It ties out to "Trimmed" number 410 (which is an AB parity) and 72515 (AG parity.) I only want to show the Mahlecram tying out to 410 because it is the best matching number and not even show 72515.
Please help! And check out my attachment....
Thanks ![]()
Try this
CustFile:
LOAD Distinct
// Part,
Trimmed,
Text(PurgeChar(PurgeChar(Trimmed, ' ') , '-')) as PartCleanCustomer,
Text(PurgeChar(PurgeChar(Trimmed, ' '), '-')) &'FEL-PRO INC.' as %PartClean,
[Part Desc 1] as CustDescription//,
// [PO Cost]
FROM
(ooxml, embedded labels, table is FP);
Left Join (CustFile)
//IntrchFP:
LOAD Distinct
// F1,
ITEMA as MahleCram,
PNPUBA as MahlePublished,
// VEHTYA,
// ENGMAK,
// CACMCD,
CMNAME,
CACMPC,
Text(PurgeChar(PurgeChar( CACMPC, ' '), '-')) &CMNAME as %PartClean,
// CMTYPE,
CAPAR as Parity,
ABCA as PopCode,
DESCA//,
// CAMSTQ,
// CACMPQ,
// CMCMCD,
// CLASA,
// CACRIN,
// CACOMM
FROM
(biff, embedded labels, table is INTRCHFP$)
//Where Parity = 'AB'
;
Right Join (CustFile)
LOAD MahleCram,
MinString(Parity) as Parity
Resident CustFile
Group By MahleCram;
You want this to be done in the script to completely remove 72515 or do you want to do this in a chart?
Let's try in the script.
Thanks
Try this
CustFile:
LOAD Distinct
// Part,
Trimmed,
Text(PurgeChar(PurgeChar(Trimmed, ' ') , '-')) as PartCleanCustomer,
Text(PurgeChar(PurgeChar(Trimmed, ' '), '-')) &'FEL-PRO INC.' as %PartClean,
[Part Desc 1] as CustDescription//,
// [PO Cost]
FROM
(ooxml, embedded labels, table is FP);
Left Join (CustFile)
//IntrchFP:
LOAD Distinct
// F1,
ITEMA as MahleCram,
PNPUBA as MahlePublished,
// VEHTYA,
// ENGMAK,
// CACMCD,
CMNAME,
CACMPC,
Text(PurgeChar(PurgeChar( CACMPC, ' '), '-')) &CMNAME as %PartClean,
// CMTYPE,
CAPAR as Parity,
ABCA as PopCode,
DESCA//,
// CAMSTQ,
// CACMPQ,
// CMCMCD,
// CLASA,
// CACRIN,
// CACOMM
FROM
(biff, embedded labels, table is INTRCHFP$)
//Where Parity = 'AB'
;
Right Join (CustFile)
LOAD MahleCram,
MinString(Parity) as Parity
Resident CustFile
Group By MahleCram;
This works!
The only thing I noticed is for numbers such as MahleCram 1634 which ties out to 7183PT and 7183S; the number that stays is 7183PT which has an AG parity. The number I would want to stay is 7183S which has the better parity of AD. (AA and AB being the best and going down the line all the way to AI.)
Do you by chance have a way of doing this?
Thanks so much
This is the app image below is from the app before my changes... and I see 1634 is only associated with one Trimmed and that is 7183PT
I should have taken a screen shot.....because now that's all that appears for me too, which is strange.