Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, QV
I have a dataset in my company that you can see below
ID | Hub From | Hub To | Scanned Type | Scanned Hub |
20046678 | REY | AKU | LOCATE | AKU |
25820863 | REY | AKU | LOCATE | REY |
26532119 | REY | AKU | LOCATE | REY |
20046546 | REY | EGS | LOCATE | REY |
26052256 | REY | EGS | LOCATE | EGS |
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?
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);
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.
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);