Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Separate two different things in the script

Hi, QV

I have a dataset in my company that you can see below

ID   Hub FromHub ToScanned TypeScanned Hub
20046678   REYAKULOCATEAKU
25820863   REYAKULOCATEREY
26532119   REYAKULOCATEREY
20046546   REYEGSLOCATEREY
26052256   REYEGSLOCATEEGS

The problem I have is that the IDs that are scanned get Scanned Type = LOCATE.

But I want separate if the ID is scanned at Hub From or Hub To.

I need the scanned type to have something like LOCATE_FROM and LOCATE_TO.

How can make something like that in the script?

Any ideas?

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Maybe like this:

LOAD ID,

     [Hub From],

     [Hub To],

    If([Scanned Hub]=[Hub From], [Scanned Type] & '_FROM' ,

         If([Scanned Hub]=[Hub To], [Scanned Type] & '_TO' , [Scanned Type])) as [Scanned Type],

     [Scanned Hub]

FROM

[Qlikview Data - Scanned.xls]

(biff, embedded labels);


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
sergiorey
Partner - Creator
Partner - Creator

May be adding these lines in your LOAD statement:

...

If([Scanned Hub]=[Hub From], [Hub From])     AS LOCATE_FROM,

If([Scanned Hub]=[Hub To], [Hub To])             AS LOCATE_TO,

...

Hope it helps.

Regards,

Sergio.

Gysbert_Wassenaar

Maybe like this:

LOAD ID,

     [Hub From],

     [Hub To],

    If([Scanned Hub]=[Hub From], [Scanned Type] & '_FROM' ,

         If([Scanned Hub]=[Hub To], [Scanned Type] & '_TO' , [Scanned Type])) as [Scanned Type],

     [Scanned Hub]

FROM

[Qlikview Data - Scanned.xls]

(biff, embedded labels);


talk is cheap, supply exceeds demand