Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
Surya
New Contributor III

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

1 Solution

Accepted Solutions
Surya
New Contributor III

Re: grouping in edit script

 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

2 Replies
HirisH_V7
Honored Contributor

Re: grouping in edit script

Could you please post a sample data set and expected result.
HirisH
“Aspire to Inspire before we Expire!”
Surya
New Contributor III

Re: grouping in edit script

 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