Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor II
Contributor II

Apply Map Issue

HI,

I am using apply map in an applcation and am getting an error that cannot understand. Am re-creating the problem part below with part of the data.

There are two tables:

1) TRANS

2) AMT

Using applymap I need to get the sales value from the AMT table to the TRANS Table.

The error I get is:

Picture1.png

I am using QlikView 11.20 Sr 17

Below is the code:

TRANS:
LOAD NAME,
      CODE,
      DATE,
      TRANS
    
FROM
[TRANS DATA.xls]
(biff, embedded labels, table is TRANS$);

AMT:
LOAD DATE,
      TRANS,
      TRANS &':'& FLOOR(DATE(DATE#(DATE,'MM/DD/YYYY'),'DD/MM/YYYY')) as KEY_TRANS,
      AMT_PAID
FROM
[TRANS DATA.xls]
(biff, embedded labels, table is AMT$);

AMT_MAP:
MAPPING LOAD
KEY_TRANS,
AMT_PAID
Resident AMT;
DROP TABLE AMT;

DATA:
LOAD
TRANS &':'& FLOOR(DATE(DATE#(DATE,'MM/DD/YYYY'),'DD/MM/YYYY')) AS KEY_TRANS,
*
RESIDENT TRANS;
DROP TABLE TRANS;

FINAL:
LOAD
ApplyMap('AMT_MAP',KEY_TRANS, 0) AS AMT_PAID,
*
RESIDENT DATA;
DROP TABLE DATA; 

Tags (2)
1 Solution

Accepted Solutions
Highlighted

Re: Apply Map Issue

Not sure I understand the behavior, but this seems to solve the problem

TRANS:

LOAD NAME,

    CODE,

    DATE,

    Text(TRANS) as TRANS

FROM

[TRANS DATA.xls]

(biff, embedded labels, table is TRANS$);

AMT:

LOAD DATE,

    TRANS,

    TRANS &' : '& FLOOR(DATE(DATE#(DATE,'MM/DD/YYYY'),'DD/MM/YYYY')) as KEY_TRANS,

    AMT_PAID

FROM

[TRANS DATA.xls]

(biff, embedded labels, table is AMT$);

AMT_MAP:

MAPPING

LOAD KEY_TRANS,

AMT_PAID

Resident AMT;

DROP TABLE AMT;

DATA:

LOAD TRANS &' : '& FLOOR(DATE(DATE#(DATE,'MM/DD/YYYY'),'DD/MM/YYYY')) AS KEY_TRANS,

*

RESIDENT TRANS;

DROP TABLE TRANS;

FINAL:

LOAD ApplyMap('AMT_MAP',KEY_TRANS, 0) AS AMT_PAID,

*

RESIDENT DATA;

DROP TABLE DATA;

Capture.PNG

View solution in original post

3 Replies
Highlighted

Re: Apply Map Issue

Not sure I understand the behavior, but this seems to solve the problem

TRANS:

LOAD NAME,

    CODE,

    DATE,

    Text(TRANS) as TRANS

FROM

[TRANS DATA.xls]

(biff, embedded labels, table is TRANS$);

AMT:

LOAD DATE,

    TRANS,

    TRANS &' : '& FLOOR(DATE(DATE#(DATE,'MM/DD/YYYY'),'DD/MM/YYYY')) as KEY_TRANS,

    AMT_PAID

FROM

[TRANS DATA.xls]

(biff, embedded labels, table is AMT$);

AMT_MAP:

MAPPING

LOAD KEY_TRANS,

AMT_PAID

Resident AMT;

DROP TABLE AMT;

DATA:

LOAD TRANS &' : '& FLOOR(DATE(DATE#(DATE,'MM/DD/YYYY'),'DD/MM/YYYY')) AS KEY_TRANS,

*

RESIDENT TRANS;

DROP TABLE TRANS;

FINAL:

LOAD ApplyMap('AMT_MAP',KEY_TRANS, 0) AS AMT_PAID,

*

RESIDENT DATA;

DROP TABLE DATA;

Capture.PNG

View solution in original post

Highlighted
Contributor II
Contributor II

Re: Apply Map Issue

Hi Sunny,

Thanks as always for helping out, it works.

Appreciate it.

Highlighted
Creator
Creator

Re: Apply Map Issue