Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
nls
New Contributor

Normalizing Upper and Lower characters of fields after loading data

Hi,

I'm loading "County" from an excel file but the fields are either in UPPER or lower case (e.g. GREECE and greece) so they show as different countries in my app.

How do I normalize the fields after I've loaded data, without having to fix the source data?

thanks/n

2 Replies

Re: Normalizing Upper and Lower characters of fields after loading data

Hi Nick, there are some strings functions to normalize the values like upper, lower and capitalize:

upper( 'abcD' ) returns 'ABCD'. --> all upper case

lower( 'abcD' ) returns 'abcd'. --> all lower case

capitalize ('my little pony') returns 'My Little Pony' --> first letter of eah word is upper case, the other lower case

michielvandegoo
Valued Contributor

Re: Normalizing Upper and Lower characters of fields after loading data

First set all data to lower case and then Capitalize or Upper case:

Capitalize(lower(Country field))

Load *,

  Capitalize(lower(F1)) as Country;

LOAD * INLINE [

    F1

    Netherlands

    NETHERLANDS

    GermanY

    germany

];

F1

GermanY

germany

NETHERLANDS

Netherlands

will become:

Country

Germany

Netherlands

Community Browser