Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

IF left or right function

Hi.

What is the best way in the script to do some string functions like this,

if some places are with North or north (like london north or Dublin south) I would like to have the result "N" or "S".

Thanks in advance!

11 Replies
whiteline
Master II
Master II

Hi.

I think it's not hard to adopt the solution provided above by jerem1234.

Replace function can help you to omit the direction word in the station name and then you can add it as a symbol.

jerem1234
Specialist II
Specialist II

You could try a mapping like:

map1:

Mapping load * Inline [

x, y

Norra, N

Södra, S

norra, N

södra, S

];

Then for your field do:

MapSubString('map1', Station) as Station

Hope this helps!