Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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_NAME | FAMILY_ID |
AA | 111 |
BB | 222 |
CC | 333 |
DD | 444 |
EE | 555 |
FF | 666 |
GG | 777 |
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
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
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
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