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

Adding up the dataset values.

I have survey responses like expert, beginner etc.

I want to convert all the text to numbers in qlikview

i loaded the file in qlikview but i need for eg expert as 5 beginner as 1

How do i do that.

Is there any function like setting up the value for these text

please help

4 Replies
Anonymous
Not applicable
Author

Use a mapping.Data Cleansing

sunny_talwar

Create a Mapping Load

MappingTable:

Mapping

LOAD * Inline [

Text, Number

Expert, 5

Intermediate, 3

Beginner, 1

];

FactTable:

LOAD Level,

          ApplyMap('MappingTable', Level) as Number

FROM Source;

swuehl
MVP
MVP

You could map your values like

MAP:
MAPPING LOAD

old, dual(old, number) AS new

INLINE [

old, number

expert, 5

beginner, 1

];

Then in your survey table, use something like

LOAD

     survey,

     ApplyMap('MAP', response) AS response

FROM SurveyTable;

edit:

I've used a dual value, so you have both text and number at hand, using num() or text().

maxgro
MVP
MVP

maybe an if or a pick/wildmatch or pick/match

load

     pick(wildmatch(yourfield, 'expert', 'beginner', '*'), 5, 1, 0) as newfield,

     yourfield

inline [

yourfield

expert

expert

beginner

other

];