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: 
risabhroy_03
Partner - Creator II
Partner - Creator II

Matching Values in Data Load Editor

I have a column named oltp, which gives numeric values.

I want to display some text based on the numeric value.

[1-Total,2-Detail,3-Back Order & 4-Order Line]

in data load editor. Plzzz help

1 Solution

Accepted Solutions
stevejoyce
Specialist II
Specialist II

Like @Frank_Hartmann said with dual function.  Or you can create a column in your data model.

You can first load a mapping table:

map_fieldvalue_fieldtext:

mapping load * inline [

value, field

1, Total

2, Detail

3, Back Order

4, Order Line

]

;

 

and in your load script when loading the table with the numeric value, you can also add a field that is, applymap('map_fieldvalue_fieldtext', value) as fieldtext

Even if you use the Dual function, you could use this as well

dual(applymap('map_fieldvalue_fieldtext', value), value) as fielddual.

View solution in original post

2 Replies
Frank_Hartmann
Master II
Master II

stevejoyce
Specialist II
Specialist II

Like @Frank_Hartmann said with dual function.  Or you can create a column in your data model.

You can first load a mapping table:

map_fieldvalue_fieldtext:

mapping load * inline [

value, field

1, Total

2, Detail

3, Back Order

4, Order Line

]

;

 

and in your load script when loading the table with the numeric value, you can also add a field that is, applymap('map_fieldvalue_fieldtext', value) as fieldtext

Even if you use the Dual function, you could use this as well

dual(applymap('map_fieldvalue_fieldtext', value), value) as fielddual.