Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

accented letters in the script

Hi,

I need to rename some provinces to insert in a map.
What I've done so far is:

LOAD
PAESE,
REGIONE as REGIONE_SOURCE,
If(REGIONE = 'TRENTINO ALTO ADIGE', 'TRENTINO-ALTO ADIGE',
IF(REGIONE = 'EMILIA ROMAGNA', 'EMILIA-ROMAGNA', REGIONE)) as [REGIONE],
PROVINCIA as PROVINCIA_SOURCE,
if(PROVINCIA = 'PESARO URBINO', 'PESARO E URBINO',
if(PROVINCIA = 'CARBONIA IGLESIAS', 'SUD SARDEGNA',
if(PROVINCIA = 'MEDIO CAMPIDANO', 'SUD SARDEGNA',
if(PROVINCIA = 'MONZA BRIANZA', 'MONZA E DELLA BRIANZA', PROVINCIA))))) as [PROVINCIA]
...

One of them has an accented letter (Forlì Cesena). Does someone know how to manage it in the script?
I need to convert 'Forlì Cesena' into 'Forlì-Cesena'.

 

Thanks in advance.

Labels (4)
5 Replies
Highlighted
MVP & Luminary
MVP & Luminary

Highlighted
Contributor III
Contributor III

Would you be so kind as to adapt to my script? I've no programming skills, it's a bit difficult for me to comprehend.

 

Thank u!

Highlighted
MVP & Luminary
MVP & Luminary

Maybe something like this:

m: mapping load * inline [
F1, F2
TRENTINO ALTO ADIGE, TRENTINO-ALTO ADIGE,
EMILIA ROMAGNA, EMILIA-ROMAGNA
];

LOAD
PAESE,
REGIONE as REGIONE_SOURCE,
applymap('m', REGIONE, REGIONE) as [REGIONE],
...

- Marcus

 

Highlighted
Contributor III
Contributor III

Thank you, I'm trying, but still facing issues with some provinces. 

I'll figure it out!

 

Regards

Highlighted
MVP & Luminary
MVP & Luminary

If you load these mapping-data from a external source (file or db) and not per inline-load you shouldn't have trouble with these accent-chars. If really want to maintain this within the script you try to escape this char with a second one whereby this char isn't a pure accent else some kind of special-char … 

- Marcus