Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
arulsettu
Master III
Master III

change values in the field

Hi

i have a field like this

Capture.PNG.png

instead of S and I i have to display store and individual ho can i do that? thanks.....

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

You can use like below also...No need for Mapping Load

ODBC CONNECT32 TO [MS Access Database;DBQ=E:\sample database\AdventureWorks.accdb];

Load      CustomerID,

            IF(CustomerType = 'S', 'Store',

               IF(CustomerType = 'I', Individual)) as CustomerTypeFull;

SQL SELECT CustomerID,

    CustomerType

FROM `Sales_Customer`;

View solution in original post

24 Replies
preminqlik
Specialist II
Specialist II

This can be done in backend and front end

in backend

if(Customer='S','Store',if(Customer='I','Individual','Others')                    as               NewFieldName

or you can do by applymap

in front end

if(Customer='S','Store',if(Customer='I','Individual','Others')

senpradip007
Specialist III
Specialist III

Hi arul.

Mr Prem is right. You can try this.

arulsettu
Master III
Master III
Author

Customer is table name?

Not applicable

try this

in expression--

pick(match(CustomerTy,'S','I'),'store','indivisual')

**********************************************

in script

pick(match(CustomerTy,'S','I'),'store','indivisual') as Customer

preminqlik
Specialist II
Specialist II

This can be done in backend and front end

in backend

if(CustomerTy='S','Store',if(CustomerTy='I','Individual','Others')                    as               NewFieldName

or you can do by applymap

in front end

if(CustomerTy='S','Store',if(CustomerTy='I','Individual','Others')

and try Vishwaranjan Kumar solution its a better approach...

er_mohit
Master II
Master II

You can use mapping load for that

like this

Type:

mapping LOAD * INLINE [

    CustomerType,FullName

    S,Store

    I,Individual

    ];

Map CustomerType using Type;

LOAD * INLINE [

    CustomerType

    S

    I

    ];

arulsettu
Master III
Master III
Author

if(CustomerType='S','Store',if(CustomerType='I','Individual') as new;

hi it throw script error.. did i made any mistake?

rsdhavle
Creator II
Creator II

You can use applymap() function which will work as lookup for you and it would be a good approach

arulsettu
Master III
Master III
Author

Hi

Capture.PNG.png

it display like this in script it says error.. thanks...