Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
vignesh_s
Creator
Creator

subfield,left

ProductCategorySubCategory
Edelweiss Tokio Group Credit Protection - SMEedelweiss tokio group CREDIT PROTECTION
Edelweiss Tokio Group Credit Protection - SME - NEWedelweiss tokio group CREDIT PROTECTION
Edelweiss Tokio Life - Cash Flow Protectionedelweiss 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) - OLDedelweiss tokio life PROTECTION
Edelweiss Tokio Life - Protection - (Single Pay)edelweiss tokio life PROTECTION
Edelweiss Tokio Life - Protection  - (Single Pay) - OLDedelweiss tokio life PROTECTION
Edelweiss Tokio Life - Save n Prosperedelweiss tokio life SAVE N PROSPER
Edelweiss Tokio Life - Single Pay Endowment Assurance Planedelweiss tokio life SINGLE PAY ENDOWMENT ASSURANCE PLAN
Edelweiss Tokio Life - Single Pay Endowment Assurance Plan - OLDedelweiss 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

20 Replies
MarcoWedel

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:

QlikCommunity_Thread_286084_Pic1.JPG

QlikCommunity_Thread_286084_Pic2.JPG

QlikCommunity_Thread_286084_Pic3.JPG

QlikCommunity_Thread_286084_Pic4.JPG

QlikCommunity_Thread_286084_Pic5.JPG

QlikCommunity_Thread_286084_Pic9.JPG

QlikCommunity_Thread_286084_Pic6.JPG

QlikCommunity_Thread_286084_Pic10.JPG

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