Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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
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.