Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
My requirement is to create a field and categorize into 2 -Category 1 and Category 2.
1)If Code starts with alphabets then
1.1)if it belongs to Product Group K01 ,it is categorized as Category 1
1.2) if it belongs to Product Group K05 ,it is categorized as Category 2
2)If Code starts with integer 6
2.1)if it belongs to Product Group K01 ,it is categorized as Category 1
3)If Code starts with integer 2
3.1)if it belongs to Product Group K05 ,it is categorized as Category 2
Input:
Product Group Code
K01 YS4341
K05 YS4342
K01 YT0517
K05 YT0518
K01 642130
K05 642130
K01 690802
K05 690802
K01 290802
K05 290802
Output:
Product Group Code Category
K01 YS4341 Category1
K05 YS4342 Category2
K01 YT0517 Category1
K05 YT0518 Category2
K01 642130 Category1
K05 642130
K01 690802 Category1
K05 690802
K01 290802
K05 290802 Category2
Thanks,
Ruma
Ruma,
Try this expression:
IF(Product = 'K01', 'Category1',
IF(Product = 'K05' and MATCH(LEFT(Group Code,1),'2','6'), 'Category2',
IF(Product = 'K05' and MATCH(LEFT(Group Code,1),'Y'), 'Category2',
NULL())))
Regards
Hi ,
It din't give expected output.