Qlik Community

New to Qlik Community

Discussion board for questions on how to use Qlik Community and its features.

Announcements
This forum is for questions and information about how to use the Qlik Community.
Please do not post product related questions here.
Select the correct forum from: Qlik Product Forums
Not applicable

INLINE


Hi ,

I have a QVD file shown below.

PRODUCT:
LOAD MARKET_NAME,
    
FAMILY_ID,
    
AST_PROMO_FLG,
     PRODUCT_NAME,
    
MARKET_NAME,
FROM

Now here I have informations like

PRODUCT_NAMEFAMILY_ID
AA111
BB222
CC333
DD444
EE555
FF666
GG777

NOW I WANT TO CHANGE THE FAMILY_ID FOR SELECTED PRODUCTS LIKE

EE = 999 & GG = 888.

CAN ANY ONE HELP ME ON THE SAME.

THANKS IN ADVANCE.

REGARDS,

KK

3 Replies
Not applicable

Re: INLINE

Hi,

You can use a combination of mapping table and applymap.

Example of adjusted script syntax:

MappingTable:

MAPPING

LOAD * INLINE

[

FAMILY_ID, FAMILY_ID_NEW

999, 999_NEW

888, 888_NEW

]

;

And for your QVD use the following load:

PRODUCT:
LOAD MARKET_NAME,
     APPLYMAP('MappingTable',
FAMILY_ID, FAMILY_ID) AS FAMILY_ID,
    
AST_PROMO_FLG,
     PRODUCT_NAME,
    
MARKET_NAME,
FROM

The disadvantage of this solution is that your QVD load is no longer optimized (= fast). Maybe you already have a resident load later in the script in which you can incorporate the function?

Kind regards,

Matthijs

Re: INLINE

Hi,

     You can use the concept of Mapping table.

     You will get the detailed information about this function in Help section of QlikView Desktop.

Regards,

Kaushik Solanki

Re: INLINE

Hi,

Try below

Temp:

Load * Inline

[

PRODUCT_NAME,    FAMILY_ID

AA,    111

BB,    222

CC,    333

DD,    444

EE,    555

FF,    666

GG,    777

];

Main:

Load *,if (PRODUCT_NAME='EE',999,if(PRODUCT_NAME='GG',888,FAMILY_ID)) as FAMILY_ID1

resident Temp;

drop Table Temp;

Regards

ASHFAQ

Community Browser