Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
i have two tables, one is person
person:
LOAD PersonID,
PersonCode,
PersonName
from ........................
second one is sales
sales:
LOAD
Date,
ZMID,
RMID,
BMID,
MEID,
netsales
from ...................
Now i want PersonName for ZMID, RMID. BMID and MEID in sales table where PersonID=ZMID as ZMPersonName, PersonID=RMID as RmPersonName, PersonID=BMID as BMPersonName and PersonID=MEID as MEPersonName,
How we can do in qlikview i tried with applymap but its not working..which function we will use in QV.
thanks in advance...
Rg,
baru..
Hi Baru,
You can achieve this by making the crosstable() function like this.,
T1:
LOAD * INLINE [
Person_ID, Person_Name, Person_Code
ZMID, A, 1
RMID, B, 2
BMID, C, 3
MEID, D, 4
];
S1:
LOAD * INLINE [
Date, netsales,ZMID,RMID,BMID,MEID
1/2/2013, 100
1/3/2013, 200
1/4/2013, 300
1/5/2013, 400
1/6/2013, 500
];
S2:
CrossTable(Person_ID,Value,2)
Load * Resident S1;
Drop Table S1;
See this sample .
Hope it helps you.
Hi
I would do it like this:
MapPerson:
Mapping LOAD PersonID,
PersonName
from ........................
second one is sales
sales:
LOAD
Date,
ZMID,
ApplyMap('MapPerson', ZMID, 'UNKNOWN') As ZMPersonName,
RMID,
ApplyMap('MapPerson', RMID, 'UNKNOWN') As RMPersonName,
BMID,
ApplyMap('MapPerson', BMID, 'UNKNOWN') As BMPersonName,
MEID,
ApplyMap('MapPerson', MEID, 'UNKNOWN') As MEPersonName,
netsales
from ...................
HTH
Jonathan