Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

Re: How to map values with squarebrackets into values without squarebrackets

Field1 also has values without square brackets...those values are not listed..

Eg:

1111[nb 2]

2222[4]

3333[4]

4444

5555

On using Left( ), Output is

1111

2222

3333

4444 and 5555 are not listed....

Highlighted
MVP
MVP

Re: How to map values with squarebrackets into values without squarebrackets

Hi,

Yes, because there is no index number, but a conditional should work around that

Directory;

Data:

LOAD Left(Field1, If(Index(Field1, '[') -1 <= 0, Len(Field1), Index(Field1, '[') -1))  AS Field1

FROM

test.txt

(txt, codepage is 1252, embedded labels, delimiter is '\t', msq);

So you keep using Left() but when there is no bracket, then you take all characters from value, otherwise only until the bracket.

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Not applicable

Re: How to map values with squarebrackets into values without squarebrackets

Thanks Dude...