Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Surya
Creator II
Creator II

grouping in edit script



I have a 2 fields i need to grouping in edit script

field names are Material and finishing days

in the material the material code like 6-10 ,6-9,6-13,10-13 like

and finishing days 1-1000


here i want grouping

material other than 6-10 and days >30    //one group

material other than 6-9 and days >30     //one group

material other than 6-10 and days <=30    //one group

material other than 6-9 and days <=30     //one group

material has 6-9    //one group

material other than 6-9    //one group




How can i do
the two fields available in same table

Labels (2)
1 Solution

Accepted Solutions
Surya
Creator II
Creator II
Author

 load *, if(NOT WILDMATCH(MATERIAL_LONG_INV,'*6-10*') AND FINISHING_AGEING_DAYS_INV >30,'STRSALES', if(NOT WILDMATCH(MATERIAL_LONG_INV,'*6-10*') AND FINISHING_AGEING_DAYS_INV <=30,'STRPLANT', if(WILDMATCH(MATERIAL_LONG_INV,'*6-10*') ,'STRGAUCTION'), if(NOT WILDMATCH(MATERIAL_LONG_INV,'*6-9*') AND FINISHING_AGEING_DAYS_INV >30,'MLSMASALES', if(NOT WILDMATCH(MATERIAL_LONG_INV,'*6-9*') AND FINISHING_AGEING_DAYS_INV <=30,'MLSMAPLANT', if(WILDMATCH(MATERIAL_LONG_INV,'*6-9*' ,'MLSMAUCTION')))))AS SP_GROUP

View solution in original post

2 Replies
HirisH_V7
Master
Master

Could you please post a sample data set and expected result.
HirisH
Surya
Creator II
Creator II
Author

 load *, if(NOT WILDMATCH(MATERIAL_LONG_INV,'*6-10*') AND FINISHING_AGEING_DAYS_INV >30,'STRSALES', if(NOT WILDMATCH(MATERIAL_LONG_INV,'*6-10*') AND FINISHING_AGEING_DAYS_INV <=30,'STRPLANT', if(WILDMATCH(MATERIAL_LONG_INV,'*6-10*') ,'STRGAUCTION'), if(NOT WILDMATCH(MATERIAL_LONG_INV,'*6-9*') AND FINISHING_AGEING_DAYS_INV >30,'MLSMASALES', if(NOT WILDMATCH(MATERIAL_LONG_INV,'*6-9*') AND FINISHING_AGEING_DAYS_INV <=30,'MLSMAPLANT', if(WILDMATCH(MATERIAL_LONG_INV,'*6-9*' ,'MLSMAUCTION')))))AS SP_GROUP