Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Could anybody help me with this statement:
if(mid(BaseItem,10,3) = 'D60', '',
if(mid(BaseItem,10,1) = ('H' or 'T' or 'F' or 'V'), mid(BaseItem,11,2), 'Invalid')) as Lenght,
An example for the BaseItem could be H20. But Qlik View is only showing "Invalid". I also tried without the brackets around 'H' or 'T' or 'F' or 'V' but then I get a correct result only for the first value in line, which means if it H20, then it´s correct but if it is F20 then it shows "Invalid" again. Do I have to write an if statement for each of the letters?
Best regards
Carolin
you can write
if(mid(BaseItem,10,3) = 'D60', '',
if(wildmatch(mid(BaseItem,10,1), 'H','T','F','V'), mid(BaseItem,11,2), 'Invalid')) as Lenght,
you can write
if(mid(BaseItem,10,3) = 'D60', '',
if(wildmatch(mid(BaseItem,10,1), 'H','T','F','V'), mid(BaseItem,11,2), 'Invalid')) as Lenght,
Carolin,
Try this
if((mid(BaseItem,10,1) = ('H' ) or mid(BaseItem,10,1) = ('T)' or mid(BaseItem,10,1) =( 'F') or mid(BaseItem,10,1) =( 'V')), mid(BaseItem,11,2), 'Invalid')) as Lenght,
or
if(match(mid(BaseItem,10,1) , 'H' , 'T' , 'F' ,'V'), mid(BaseItem,11,2), 'Invalid')) as Lenght,
i think this will help you.
if(mid(BaseItem,10,3) = 'D60', '', if(Match(mid(BaseItem,10,1),'H' , 'T', 'F' , 'V'), mid(BaseItem,11,2), 'Invalid')) as Lenght,
Wildmatch is perfect for this context!! Thank you!