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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Nagaraj6
Contributor II
Contributor II

Replace issue

Hello All,

I need a help

I getting wrong output  below,ending with -from-

 

Nagaraj6_0-1682509261892.png

I need concatenate Destination and From city name.

expected output ex: andaman-and-nicobar-from-pune

I am using this formula I getting syntax error

if(Des='',if(From<>'',lower(Replace(Des&'-from-'&From), '-from-', '', 2),lower(Des)),'') as [Des-From],

 

Labels (1)
3 Replies
edwin
Master II
Master II

you can try a few things, try using isnull(Des) and for From or use len(Des)=0
sometimes using the test against 0 len string does not work depending on the data

anat
Master
Master

Can you try to eliminate the records while load where From field is null

Chanty4u
MVP
MVP

Try this 

if(From<>'',

    lower(Replace(Des&'-from-'&From, '-from-', ''), '-') as [Des-From]

)