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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help Me Out

Hello,

I am trying to make a group of item code using wild match function with their respective item names.

Eg: if(wildmatch(Itemcode,'01*'),Itemname)        as RawMaterial,

       if(wildmatch(Itemcode,'02*'),Itemname)        as Clothing,

        if(wildmatch(Itemcode,'03*'),Itemname)        as Fuel,

        if(wildmatch(Itemcode,'04*'),Itemname)        as Paper,

       if(wildmatch(Itemcode,'05*'),Itemname)        as Machine,


The problem where i am stuck is that I need to make an another group where every Item Name Starting with ItemCode '07*' till '99' need to come under a single group.

Note:The item Code is alpha-numeric.

I have tried it using the below code but not able to get it.

===>       if(WildMatch(ItemCode >='07*' or ItemCode <='99'),Itemname)   as STORES &Spares,

Please help me out.......!!!!!!!!!!!!!!

Labels (1)
1 Solution

Accepted Solutions
preminqlik
Specialist II
Specialist II

small correction in above gysberts exp ..(Closing bracket for num())


If( Num(Left(ItemCode,2),'00' ) >= 07 and Num(Left(ItemCode,2),'00') <= 99, Itemname) as STORES&Spares

View solution in original post

5 Replies
qlikviewwizard
Master II
Master II

Hi atulshishodia,

Try the below:

if(WildMatch(ItemCode >='07*' or ItemCode <='99'),Itemname)  as [STORES &Spares],


Hope this will helps.

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Perhaps like this:

If( Num(Left(ItemCode,2)) >= 7 and Num(Left(ItemCode,2)) <= 99, Itemname) as STORES&Spares


talk is cheap, supply exceeds demand
Not applicable
Author

ok i will try it now and let you know!!

Thanks

preminqlik
Specialist II
Specialist II

small correction in above gysberts exp ..(Closing bracket for num())


If( Num(Left(ItemCode,2),'00' ) >= 07 and Num(Left(ItemCode,2),'00') <= 99, Itemname) as STORES&Spares

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Fixed. Thanks!


talk is cheap, supply exceeds demand