Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Can some one help me here for mapping load and apply map
i am writing script as below,
MAP:
mapping LOAD
[PSA Project pse Project ID],
[HOLD Closure date2]
FROM
[$(QVD_Path)\GSD_HOLDClosuredate2.qvd]
(qvd);
HOLD:
LOAD
[PSA Project pse Project ID],
[HOLD Closure date],
Applymap('MAP', [PSA Project pse Project ID],[HOLD Closure date2]) as T
FROM
[$(QVD_Path)\GSD_HOLDClosuredate.qvd]
(qvd);
out put i got as below,
but here one Project ID can have multiple dates, but when i wrote apply map for "T" column 2 rows dates are coming same which it should not be. it should come one date as 08/16/2017 and second date as 09/29/2017. as shown in second snapshot.
can some one help me here.
I think I might know what went wrong... can you try this
MAP:
MAPPING
LOAD [PSA Project pse Project ID] & AutoNumber(RowNo(), [PSA Project pse Project ID] & 1),
[HOLD Closure date2]
FROM [$(QVD_Path)\GSD_HOLDClosuredate2.qvd] (qvd);
HOLD:
LOAD [PSA Project pse Project ID],
[HOLD Closure date],
Applymap('MAP', [PSA Project pse Project ID] & AutoNumber(RowNo(), [PSA Project pse Project ID] & 2)) as T
FROM [$(QVD_Path)\GSD_HOLDClosuredate.qvd] (qvd);
try this
Applymap('MAP', [PSA Project pse Project ID], Null() ) as T
or please share some sample app
* you have two records ([HOLD Closure date]) for [PSA Project pse Project ID] (PR- 539478)
HI,
I already Tried that same results i am getting
!
in T Column we are getting same Date's but i should see 2 different Dates.
Hello,
mapping doesn't work with multiple values under one key ([PSA Project pse Project ID]). So this is the normal behaviour.
"The only time that you cannot use Applymap() instead of a join is if you want to fetch more than one single corresponding value (record) from the second table." (Source: https://community.qlik.com/blogs/qlikviewdesignblog/2012/09/18/one-favorite-function-applymap)
Kind regards
Peter
Any specific reason to use Mapping load ?,
if not you can simply do that using joins like left or Inner
Anand
How about this
MAP:
MAPPING
LOAD [PSA Project pse Project ID] & AutoNumber(RowNo(), [PSA Project pse Project ID]),
[HOLD Closure date2]
FROM [$(QVD_Path)\GSD_HOLDClosuredate2.qvd] (qvd);
HOLD:
LOAD [PSA Project pse Project ID],
[HOLD Closure date],
Applymap('MAP', [PSA Project pse Project ID] & AutoNumber(RowNo(), [PSA Project pse Project ID])) as T
FROM [$(QVD_Path)\GSD_HOLDClosuredate.qvd] (qvd);
Hi Anand,
i tried using join it is not working as it will duplicates the rows.
As we have 2 timestamps for same Project ID.
May be like this:
MAP:
Mapping LOAD
[PSA Project pse Project ID],
[HOLD Closure date2]
FROM
[$(QVD_Path)\GSD_HOLDClosuredate2.qvd](qvd);
HOLD:
LOAD
[PSA Project pse Project ID],
[HOLD Closure date],
Applymap('MAP', [PSA Project pse Project ID], ApplyMap('MAP',[HOLD Closure date2],Null()) as T
FROM
[$(QVD_Path)\GSD_HOLDClosuredate.qvd](qvd);
Hi Sunny,
Thank You for looking into this.
i tried your script below is what i got , i am getting project iD's instead of time stamps.
but i need below 2 time stamps
How many instances of PR-539478 do you have in your GSD_HOLDClosuredate.qvd? It seems that it might be more than 4? how many instances do you have in GSD_HOLDClosuredate2.qvd?
If one qvd has more than the other, how do you expect to map them?