Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Nikhil2725
Creator II
Creator II

Numeric value into words.

Hi All,

I have a database where the values will be stored as the numeric values in one interactivity_data_type_id(3).

Interactivity_data_type_id

Value

1

Abc

2

Def

3

4,3,2

4

Xyz

5

mno

 

 

 

For those numeric value text are as below.

1-Specific(Not Realistic)

2-Realistic(Not Specific)

3- Both Specific and Realistic

4-Not Specific or Realistic

 

Now I want to display the relevant text for those numeric value s below.

 

Interactivity_data_type_id

Value

1

Abc

2

Def

3

Not Specific or Realistic, Both Specific and Realistic, Realistic(Not Specific)

4

Xyz

5

mno

 

 

 

Kindly help me in displaying as above..

2 Replies
ahmetozsari
Contributor
Contributor

Hello,

Try this in script,

 

ReplaceMap:
MAPPING LOAD * INLINE [
Interactivity_data_type_id, def
1, Specific(Not Realistic)
2, Realistic(Not Specific)
3, Both Specific and Realistic
4, Not Specific or Realistic
];

load *,if(isnum(PurgeChar(Value,','))='-1',MapSubString('ReplaceMap', Value),Value) as Replaced;
LOAD * INLINE [
Interactivity_data_type_id, Value
1, Abc
2, Def
3, "4,3,2"
4, Xyz
5, mno
];

Nikhil2725
Creator II
Creator II
Author

Hi Ahmetozsari,
Thanks for the reply.
One more thing is like I just want to put this logic only for the Interactivity_data_type_id=3.