Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Product | Category | SubCategory |
Edelweiss Tokio Group Credit Protection - SME | edelweiss tokio group | CREDIT PROTECTION |
Edelweiss Tokio Group Credit Protection - SME - NEW | edelweiss tokio group | CREDIT PROTECTION |
Edelweiss Tokio Life - Cash Flow Protection | edelweiss tokio life | CASH FLOW PROTECTION |
Edelweiss Tokio Life - Protection - (Reg/5/10/15Pay) | edelweiss tokio life | PROTECTION |
Edelweiss Tokio Life - Protection - (Reg/5/10/15Pay) - OLD | edelweiss tokio life | PROTECTION |
Edelweiss Tokio Life - Protection - (Single Pay) | edelweiss tokio life | PROTECTION |
Edelweiss Tokio Life - Protection - (Single Pay) - OLD | edelweiss tokio life | PROTECTION |
Edelweiss Tokio Life - Save n Prosper | edelweiss tokio life | SAVE N PROSPER |
Edelweiss Tokio Life - Single Pay Endowment Assurance Plan | edelweiss tokio life | SINGLE PAY ENDOWMENT ASSURANCE PLAN |
Edelweiss Tokio Life - Single Pay Endowment Assurance Plan - OLD | edelweiss tokio life | SINGLE PAY ENDOWMENT ASSURANCE PLAN |
I have a product field as input ,i wanna split the product in cateory and sub cateory as shown above , can i have expresion fr tat
Hi,
if there is no algorithm that fits your unstructured input values, then maybe another solution could be to let the user decide about Categories and SubCategories, i.e. like this:
mapReduceMultiSpace:
Mapping
LOAD Repeat(' ',101-RecNo()), ' '
AutoGenerate 99;
tabCategory:
LOAD Product,
Left(ProdTemp, Index(ProdTemp,' ',IterNo())-1) as Category,
Mid(ProdTemp, Index(ProdTemp,' ',IterNo())+1) as SubCategory,
SubField(ProdTemp,' ',IterNo()) as CategorySubField,
IterNo() as CategoryDepth,
Ceil(Rand()*1000) as SomeValue
While IterNo()<=SubStringCount(ProdTemp,' ');
LOAD Product,
MapSubString('mapReduceMultiSpace',Replace(Product,'-',' ')) as ProdTemp
FROM [https://community.qlik.com/servlet/JiveServlet/download/1407191-308746/String%20Task%201.xls] (biff, embedded labels, table is Sheet1$);
tabCategoryGrp:
Generic
LOAD Product,
'Category'&CategoryDepth,
Category
Resident tabCategory;
tabCategorySubField:
Generic
LOAD Product,
'CatSubField'&CategoryDepth,
CategorySubField
Resident tabCategory;
hope this helps
regards
Marco