Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Specialist III
Specialist III

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
Highlighted
Specialist III
Specialist III

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

Highlighted
Master
Master

Hi ST

Thank you for your help.

It work.

Paul

Highlighted
Master
Master

I just send you a private msg. Pls read.

Highlighted
Specialist III
Specialist III

I didn't see any msgs in my inbox

Highlighted
Master
Master

I just send again
Highlighted
Master
Master

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