Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

Learning Map on how to remove label REVENUE ?

 

Hi All

Below is my raw data "=
(1)Raw Data A
GL --- AMOUNT
1 --- 1
2 --- 2
3 --- 3

(2) Map Raw Data
GL --- PNL_REVENUE
1 --- REV_
2 --- REV_


I have below script work fine :-

MAP_SCRIPT:
MAPPING LOAD GL_CODE_,
PNL_REVENUE
FROM
GL_P.xlsx
(ooxml, embedded labels, table is MAP_DATA);

GL_TABLE_COY:
LOAD
'A' AS SOURCE,
ApplyMap('MAP_SCRIPT',[GL_CODE_],'REVENUE') as [REV],
GL_CODE_,
AMOUNT
FROM
GL_P.xlsx
(ooxml, embedded labels, table is RAW_DATA_A);

Concatenate
LOAD
'B' AS SOURCE,
ApplyMap('MAP_SCRIPT',[GL],'REVENUE') as [REV],
GL,
AMOUNT
FROM
GL_P.xlsx
(ooxml, embedded labels, table is RAW_DATA_B);

The Field name = REV , Return 2 Label :-
REV
REVENUE

May i know how to make it display only one label REV ? ( Remove REVENUE ).

Paul

1 Solution

Accepted Solutions
Saravanan_Desingh

Are you looking something like this?

MAP_SCRIPT:
MAPPING LOAD * INLINE [
    GL_CODE_, PNL_REVENUE
    1, REV
    2, REV
    6, REV
];

GL_TABLE_COY:
LOAD
'A' AS SOURCE,
ApplyMap('MAP_SCRIPT',[GL_CODE_],'REVENUE') as [REV],
GL_CODE_,
AMOUNT;
LOAD * INLINE [
    GL_CODE_, AMOUNT
    1, 1
    2, 2
    3, 3
];

Concatenate (GL_TABLE_COY)
LOAD
'B' AS SOURCE,
ApplyMap('MAP_SCRIPT',[GL],'REVENUE') as [REV],
GL As GL_CODE_,
AMOUNT;
LOAD * INLINE [
    GL, AMOUNT
    4, 4
    5, 5
    6, 6
];

GL_TABLE_COY_OUT:
NoConcatenate
LOAD *
Resident GL_TABLE_COY
Where REV <> 'REVENUE';

Drop Table GL_TABLE_COY;

commQV15.PNG

View solution in original post

6 Replies
Saravanan_Desingh

Are you looking something like this?

MAP_SCRIPT:
MAPPING LOAD * INLINE [
    GL_CODE_, PNL_REVENUE
    1, REV
    2, REV
    6, REV
];

GL_TABLE_COY:
LOAD
'A' AS SOURCE,
ApplyMap('MAP_SCRIPT',[GL_CODE_],'REVENUE') as [REV],
GL_CODE_,
AMOUNT;
LOAD * INLINE [
    GL_CODE_, AMOUNT
    1, 1
    2, 2
    3, 3
];

Concatenate (GL_TABLE_COY)
LOAD
'B' AS SOURCE,
ApplyMap('MAP_SCRIPT',[GL],'REVENUE') as [REV],
GL As GL_CODE_,
AMOUNT;
LOAD * INLINE [
    GL, AMOUNT
    4, 4
    5, 5
    6, 6
];

GL_TABLE_COY_OUT:
NoConcatenate
LOAD *
Resident GL_TABLE_COY
Where REV <> 'REVENUE';

Drop Table GL_TABLE_COY;

commQV15.PNG

paulyeo11
Master
Master
Author

Hi ST

Thank you for your help.

It work.

Paul

paulyeo11
Master
Master
Author

I just send you a private msg. Pls read.

Saravanan_Desingh

I didn't see any msgs in my inbox

paulyeo11
Master
Master
Author

I just send again
paulyeo11
Master
Master
Author

Hi Sir

I just post my question on below link :-

https://community.qlik.com/t5/QlikView-Scripting/Case-0001-How-to-avoid-every-raw-data-tab-at-Month-...

Hope you can take a look.

Paul