Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
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
Highlighted
fchukoskie
Contributor

Re: Adding up the dataset values.

Use a mapping.Data Cleansing

Re: Adding up the dataset values.

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;

MVP
MVP

Re: Adding up the dataset values.

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().

MVP
MVP

Re: Adding up the dataset values.

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

];