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: 
Not applicable

how to

Hi All,

and thank you very much for your help!!!

I have another problem to be solved...

TEST:

LOAD    "ASSET_STATUS",

...

in the List Box returns the 0,1,3, ... values

how to assign

0, 'Ordered',

1, 'Received',

3, 'Deployed',

etc...

TEST:

"ASSET_STATUS",
if("ASSET_STATUS"=0, "ASSET_STATUS"='Ordered'),if("ASSET_STATUS"=1, "ASSET_STATUS"='Received'),
if("ASSET_STATUS"=3, 'Deployed'))), as "ASSET_STATUS", ................................. is not working

1 Solution

Accepted Solutions
sunny_talwar

Try this:

Pick(Match("ASSET_STATUS", 0, 1, 3), 'Ordered', 'Received', 'Deployed') as "ASSET_STATUS_DESCRIPTION"

View solution in original post

7 Replies
sunny_talwar

Try this:

Pick(Match("ASSET_STATUS", 0, 1, 3), 'Ordered', 'Received', 'Deployed') as "ASSET_STATUS_DESCRIPTION"

gautik92
Specialist III
Specialist III

if("ASSET_STATUS"=0, 'Ordered',if("ASSET_STATUS"=1, 'Received'),
if("ASSET_STATUS"=3, 'Deployed')), as "ASSET_STATUS",

sasiparupudi1
Master III
Master III

use apply map

map:

mapping load * inline

[

ASSET_STATUS,ASSET_DESC

0, 'Ordered',

1, 'Received',

3, 'Deployed',

];

TEST:

LOAD    "ASSET_STATUS",applymap('map',ASSET_STATUS,'NA') as ASSET_STATUS_DEC;

hth

Sasi

sunny_talwar

If the list of "ASSET_STATUS" is large, I would use the method prescribed by Sasi (ApplyMap). If the list is small, I would use Pick(Match(...)...)

Not applicable
Author

the "ASSET_STATUS" list contains 13 "ASSET_DESCRIPTION"

sunny_talwar

I think it would be safer and convenient to use ApplyMap which will give you the flexibility to make changes in the future. You can use Inline LOAD or Excel LOAD for the mapping table. Excel LOAD will make future changes easier to maintain.

kamalqlik
Partner - Specialist
Partner - Specialist

Hi Viorel,

Use the attached application to maintain your target.

You can use the Inline table or Excel for status and than map it with your transaction table to achieve the result.

Regards,

Kamal